CultureInfo.CurrentCulture
using System;
using System.Globalization;
class MainClass
{
static void Main(string[] args)
{
int theInt = 0;
Console.WriteLine("IConvertible-ing System.Int32 to System.Byte");
IConvertible itfConvert = (IConvertible)theInt;
byte theByte = itfConvert.ToByte(CultureInfo.CurrentCulture);
Console.WriteLine("Type code int converted to byte is: {0}", theByte.GetTypeCode());
Console.WriteLine("Value of converted int: {0}", theByte);
}
}
Related examples in the same category