System.Globalization.NumberStyles.AllowDecimalPoint Or System.Globalization.NumberStyles.AllowThousands : NumberStyles « Internationalization I18N « VB.Net






System.Globalization.NumberStyles.AllowDecimalPoint Or System.Globalization.NumberStyles.AllowThousands

 
                

Module Example
   Public Sub Main()
        Dim value As String
        Dim style As System.Globalization.NumberStyles
        Dim culture As System.Globalization.CultureInfo
        Dim number As Single
        value = "1.234,567"
        style = System.Globalization.NumberStyles.AllowDecimalPoint Or _
                System.Globalization.NumberStyles.AllowThousands
        culture = System.Globalization.CultureInfo.CreateSpecificCulture("es-ES")
        If Single.TryParse(value, style, culture, number) Then
           Console.WriteLine("Converted '{0}' to {1}.", value, number)
        Else
           Console.WriteLine("Unable to convert '{0}'.", value)
        End If    

    End Sub
End Module

   
  








Related examples in the same category

1.NumberStyles.Integer Or NumberStyles.AllowDecimalPoint
2.NumberStyles.Integer Or NumberStyles.AllowLeadingSign Or NumberStyles.AllowTrailingSign
3.NumberStyles.Integer Or NumberStyles.AllowThousands
4.NumberStyles.Integer Or NumberStyles.AllowExponent
5.NumberStyles.HexNumber
6.NumberStyles.AllowHexSpecifier
7.NumberStyles.Integer
8.NumberStyles.Integer Or NumberStyles.AllowThousands
9.NumberStyles.AllowParentheses Or NumberStyles.AllowTrailingSign Or NumberStyles.Float Or NumberStyles.AllowThousands
10.System.Globalization.NumberStyles.AllowDecimalPoint