Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim MyPos As Double = 19.95
Dim MyNeg As Double = -19.95
Dim MyZero As Double = 0
Dim MyString As String = MyPos.ToString("$#,##0.00;($#,##0.00);Zero")
' In the U.S. English culture, MyString has the value: $19.95.
MyString = MyNeg.ToString("$#,##0.00;($#,##0.00);Zero")
' In the U.S. English culture, MyString has the value: ($19.95).
' The minus sign is omitted by default.
MyString = MyZero.ToString("$#,##0.00;($#,##0.00);Zero")
' In the U.S. English culture, MyString has the value: Zero.
Dim myDouble As Double = 1234567890
Dim myString As String = myDouble.ToString( "(###) ### - ####" )
' The value of myString is "(123) 456 – 7890".
Dim MyInt As Integer = 42
MyString = MyInt.ToString( "My Number " + ControlChars.Lf + "= #" )
' In the U.S. English culture, MyString has the value:
' "My Number
' = 42".