SByte.ToString Method converts to string using the specified format and culture-specific format information.
Imports System.Globalization
Module Example
Public Sub Main()
Dim cultures() As CultureInfo = {CultureInfo.CreateSpecificCulture("en-US"), _
CultureInfo.CreateSpecificCulture("fr-FR"), _
CultureInfo.CreateSpecificCulture("es-ES") }
Dim positiveNumber As SByte = 111
Dim negativeNumber As SByte = -111
Dim specifiers() As String = {"G", "C", "D4", "E2", "F", "N", "P", "X2"}
For Each specifier As String In specifiers
For Each culture As CultureInfo In Cultures
Console.WriteLine("{0,2} format using {1} culture: {2, 16} {3, 16}", _
specifier, culture.Name, _
positiveNumber.ToString(specifier, culture), _
negativeNumber.ToString(specifier, culture))
Next
Next
End Sub
End Module
Related examples in the same category