Decimal.TryParse Method Converts string to Decimal
Imports System
Imports Microsoft.VisualBasic
Module MainClass
Sub Main( )
Dim value As String
Dim number As Decimal
value = "1,643.57"
If Decimal.TryParse(value, number) Then
Console.WriteLine(number)
Else
Console.WriteLine("Unable to parse '{0}'.", value)
End If
End Sub
End Module
Related examples in the same category