Format a byte value to string with culture-specific formatting information.
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
byte byteValue = 250;
CultureInfo[] providers = {new CultureInfo("en-us"),
new CultureInfo("fr-fr"),
new CultureInfo("es-es"),
new CultureInfo("de-de")};
foreach (CultureInfo provider in providers)
Console.WriteLine("{0} ({1})", byteValue.ToString("N2", provider), provider.Name);
}
}
Related examples in the same category