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