String zu Typ wandeln (Parse, TryParse)

Dim i As Integer = Integer.Parse("100") 
Dim l As Long = Long.Parse("100") 
Dim f As Single = Single.Parse("100.1") 
Dim d As Double = Double.Parse("100.1") 
Dim b As Boolean = Boolean.Parse("True")

Dim dValue As Double

If (Double.TryParse("0,45", dValue) Then
    ...
End If

Schreibe einen Kommentar