fork download
  1. Imports System
  2. Imports System.Globalization
  3.  
  4. Public Module Module1
  5. Public Sub Main()
  6. Dim ptbr = new CultureInfo("pt-br")
  7. Console.WriteLine("{0}", 123.ToString("N2", ptbr))
  8. Console.WriteLine("{0}", 123.123.ToString("N2", ptbr))
  9. Console.WriteLine("{0}", 123123132112321321.123d.ToString("N2", ptbr))
  10. Console.WriteLine("{0}", 0.123.ToString("N2", ptbr))
  11. Console.WriteLine("{0}", 0.158123.ToString("N2", ptbr))
  12. End Sub
  13. End Module
  14.  
  15. 'https://pt.stackoverflow.com/q/271855/101'
Success #stdin #stdout 0.02s 15228KB
stdin
Standard input is empty
stdout
123,00
123,12
123.123.132.112.321.321,12
0,12
0,16