Imports System
Imports System.Globalization
Public Module Module1
Public Sub Main()
Dim ptbr = new CultureInfo("pt-br")
Console.WriteLine("{0}", 123.ToString("N2", ptbr))
Console.WriteLine("{0}", 123.123.ToString("N2", ptbr))
Console.WriteLine("{0}", 123123132112321321.123d.ToString("N2", ptbr))
Console.WriteLine("{0}", 0.123.ToString("N2", ptbr))
Console.WriteLine("{0}", 0.158123.ToString("N2", ptbr))
End Sub
End Module
'https://pt.stackoverflow.com/q/271855/101'
SW1wb3J0cyBTeXN0ZW0KSW1wb3J0cyBTeXN0ZW0uR2xvYmFsaXphdGlvbgoJCQkJClB1YmxpYyBNb2R1bGUgTW9kdWxlMQoJUHVibGljIFN1YiBNYWluKCkKCQlEaW0gcHRiciA9IG5ldyBDdWx0dXJlSW5mbygicHQtYnIiKQoJCUNvbnNvbGUuV3JpdGVMaW5lKCJ7MH0iLCAxMjMuVG9TdHJpbmcoIk4yIiwgcHRicikpCgkJQ29uc29sZS5Xcml0ZUxpbmUoInswfSIsIDEyMy4xMjMuVG9TdHJpbmcoIk4yIiwgcHRicikpCgkJQ29uc29sZS5Xcml0ZUxpbmUoInswfSIsIDEyMzEyMzEzMjExMjMyMTMyMS4xMjNkLlRvU3RyaW5nKCJOMiIsIHB0YnIpKQoJCUNvbnNvbGUuV3JpdGVMaW5lKCJ7MH0iLCAwLjEyMy5Ub1N0cmluZygiTjIiLCBwdGJyKSkKCQlDb25zb2xlLldyaXRlTGluZSgiezB9IiwgMC4xNTgxMjMuVG9TdHJpbmcoIk4yIiwgcHRicikpCglFbmQgU3ViCkVuZCBNb2R1bGUKCidodHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMjcxODU1LzEwMSc=