fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace sringformatformat__
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. float A =1.23456f;
  13. int Digits = 2;
  14. string F = string.Format(@"{0}0:f{1}{2}", '{', Digits,'}');
  15. Console.WriteLine(F, A);
  16.  
  17. return;
  18. }
  19. }
  20. }
Success #stdin #stdout 0.03s 38000KB
stdin
Standard input is empty
stdout
1.23