mscorlib(4.0.0.0) API with additions
System.Convert Class Reference

Converts a base data type to another base data type. More...

Static Public Member Functions

static TypeCode GetTypeCode (object value)
 Returns the T:System.TypeCode for the specified object. More...
 
static bool IsDBNull (object value)
 Returns an indication whether the specified object is of type T:System.DBNull. More...
 
static object ChangeType (object value, TypeCode typeCode)
 Returns an object of the specified type whose value is equivalent to the specified object. More...
 
static object ChangeType (object value, TypeCode typeCode, IFormatProvider provider)
 Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information. More...
 
static object ChangeType (object value, Type conversionType)
 Returns an object of the specified type and whose value is equivalent to the specified object. More...
 
static object ChangeType (object value, Type conversionType, IFormatProvider provider)
 Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information. More...
 
static bool ToBoolean (object value)
 Converts the value of a specified object to an equivalent Boolean value. More...
 
static bool ToBoolean (object value, IFormatProvider provider)
 Converts the value of the specified object to an equivalent Boolean value, using the specified culture-specific formatting information. More...
 
static bool ToBoolean (bool value)
 Returns the specified Boolean value; no actual conversion is performed. More...
 
static bool ToBoolean (sbyte value)
 Converts the value of the specified 8-bit signed integer to an equivalent Boolean value. More...
 
static bool ToBoolean (char value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static bool ToBoolean (byte value)
 Converts the value of the specified 8-bit unsigned integer to an equivalent Boolean value. More...
 
static bool ToBoolean (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent Boolean value. More...
 
static bool ToBoolean (ushort value)
 Converts the value of the specified 16-bit unsigned integer to an equivalent Boolean value. More...
 
static bool ToBoolean (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent Boolean value. More...
 
static bool ToBoolean (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent Boolean value. More...
 
static bool ToBoolean (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent Boolean value. More...
 
static bool ToBoolean (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent Boolean value. More...
 
static bool ToBoolean (string value)
 Converts the specified string representation of a logical value to its Boolean equivalent. More...
 
static bool ToBoolean (string value, IFormatProvider provider)
 Converts the specified string representation of a logical value to its Boolean equivalent, using the specified culture-specific formatting information. More...
 
static bool ToBoolean (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent Boolean value. More...
 
static bool ToBoolean (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent Boolean value. More...
 
static bool ToBoolean (decimal value)
 Converts the value of the specified decimal number to an equivalent Boolean value. More...
 
static bool ToBoolean (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static char ToChar (object value)
 Converts the value of the specified object to a Unicode character. More...
 
static char ToChar (object value, IFormatProvider provider)
 Converts the value of the specified object to its equivalent Unicode character, using the specified culture-specific formatting information. More...
 
static char ToChar (bool value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static char ToChar (char value)
 Returns the specified Unicode character value; no actual conversion is performed. More...
 
static char ToChar (sbyte value)
 Converts the value of the specified 8-bit signed integer to its equivalent Unicode character. More...
 
static char ToChar (byte value)
 Converts the value of the specified 8-bit unsigned integer to its equivalent Unicode character. More...
 
static char ToChar (short value)
 Converts the value of the specified 16-bit signed integer to its equivalent Unicode character. More...
 
static char ToChar (ushort value)
 Converts the value of the specified 16-bit unsigned integer to its equivalent Unicode character. More...
 
static char ToChar (int value)
 Converts the value of the specified 32-bit signed integer to its equivalent Unicode character. More...
 
static char ToChar (uint value)
 Converts the value of the specified 32-bit unsigned integer to its equivalent Unicode character. More...
 
static char ToChar (long value)
 Converts the value of the specified 64-bit signed integer to its equivalent Unicode character. More...
 
static char ToChar (ulong value)
 Converts the value of the specified 64-bit unsigned integer to its equivalent Unicode character. More...
 
static char ToChar (string value)
 Converts the first character of a specified string to a Unicode character. More...
 
static char ToChar (string value, IFormatProvider provider)
 Converts the first character of a specified string to a Unicode character, using specified culture-specific formatting information. More...
 
static char ToChar (float value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static char ToChar (double value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static char ToChar (decimal value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static char ToChar (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static sbyte ToSByte (object value)
 Converts the value of the specified object to an 8-bit signed integer. More...
 
static sbyte ToSByte (object value, IFormatProvider provider)
 Converts the value of the specified object to an 8-bit signed integer, using the specified culture-specific formatting information. More...
 
static sbyte ToSByte (bool value)
 Converts the specified Boolean value to the equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (sbyte value)
 Returns the specified 8-bit signed integer; no actual conversion is performed. More...
 
static sbyte ToSByte (char value)
 Converts the value of the specified Unicode character to the equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (short value)
 Converts the value of the specified 16-bit signed integer to the equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (decimal value)
 Converts the value of the specified decimal number to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (string value)
 Converts the specified string representation of a number to an equivalent 8-bit signed integer. More...
 
static sbyte ToSByte (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 8-bit signed integer, using the specified culture-specific formatting information. More...
 
static sbyte ToSByte (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static byte ToByte (object value)
 Converts the value of the specified object to an 8-bit unsigned integer. More...
 
static byte ToByte (object value, IFormatProvider provider)
 Converts the value of the specified object to an 8-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static byte ToByte (bool value)
 Converts the specified Boolean value to the equivalent 8-bit unsigned integer. More...
 
static byte ToByte (byte value)
 Returns the specified 8-bit unsigned integer; no actual conversion is performed. More...
 
static byte ToByte (char value)
 Converts the value of the specified Unicode character to the equivalent 8-bit unsigned integer. More...
 
static byte ToByte (sbyte value)
 Converts the value of the specified 8-bit signed integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (ushort value)
 Converts the value of the specified 16-bit unsigned integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (decimal value)
 Converts the value of the specified decimal number to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (string value)
 Converts the specified string representation of a number to an equivalent 8-bit unsigned integer. More...
 
static byte ToByte (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 8-bit unsigned integer, using specified culture-specific formatting information. More...
 
static byte ToByte (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static short ToInt16 (object value)
 Converts the value of the specified object to a 16-bit signed integer. More...
 
static short ToInt16 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 16-bit signed integer, using the specified culture-specific formatting information. More...
 
static short ToInt16 (bool value)
 Converts the specified Boolean value to the equivalent 16-bit signed integer. More...
 
static short ToInt16 (char value)
 Converts the value of the specified Unicode character to the equivalent 16-bit signed integer. More...
 
static short ToInt16 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 16-bit signed integer. More...
 
static short ToInt16 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 16-bit signed integer. More...
 
static short ToInt16 (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 16-bit signed integer. More...
 
static short ToInt16 (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (short value)
 Returns the specified 16-bit signed integer; no actual conversion is performed. More...
 
static short ToInt16 (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (decimal value)
 Converts the value of the specified decimal number to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (string value)
 Converts the specified string representation of a number to an equivalent 16-bit signed integer. More...
 
static short ToInt16 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 16-bit signed integer, using the specified culture-specific formatting information. More...
 
static short ToInt16 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static ushort ToUInt16 (object value)
 Converts the value of the specified object to a 16-bit unsigned integer. More...
 
static ushort ToUInt16 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 16-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static ushort ToUInt16 (bool value)
 Converts the specified Boolean value to the equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (char value)
 Converts the value of the specified Unicode character to the equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (short value)
 Converts the value of the specified 16-bit signed integer to the equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (ushort value)
 Returns the specified 16-bit unsigned integer; no actual conversion is performed. More...
 
static ushort ToUInt16 (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (decimal value)
 Converts the value of the specified decimal number to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (string value)
 Converts the specified string representation of a number to an equivalent 16-bit unsigned integer. More...
 
static ushort ToUInt16 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 16-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static ushort ToUInt16 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static int ToInt32 (object value)
 Converts the value of the specified object to a 32-bit signed integer. More...
 
static int ToInt32 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 32-bit signed integer, using the specified culture-specific formatting information. More...
 
static int ToInt32 (bool value)
 Converts the specified Boolean value to the equivalent 32-bit signed integer. More...
 
static int ToInt32 (char value)
 Converts the value of the specified Unicode character to the equivalent 32-bit signed integer. More...
 
static int ToInt32 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 32-bit signed integer. More...
 
static int ToInt32 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 32-bit signed integer. More...
 
static int ToInt32 (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 32-bit signed integer. More...
 
static int ToInt32 (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (int value)
 Returns the specified 32-bit signed integer; no actual conversion is performed. More...
 
static int ToInt32 (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (decimal value)
 Converts the value of the specified decimal number to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (string value)
 Converts the specified string representation of a number to an equivalent 32-bit signed integer. More...
 
static int ToInt32 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 32-bit signed integer, using the specified culture-specific formatting information. More...
 
static int ToInt32 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static uint ToUInt32 (object value)
 Converts the value of the specified object to a 32-bit unsigned integer. More...
 
static uint ToUInt32 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 32-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static uint ToUInt32 (bool value)
 Converts the specified Boolean value to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (char value)
 Converts the value of the specified Unicode character to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (short value)
 Converts the value of the specified 16-bit signed integer to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (uint value)
 Returns the specified 32-bit unsigned integer; no actual conversion is performed. More...
 
static uint ToUInt32 (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (decimal value)
 Converts the value of the specified decimal number to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (string value)
 Converts the specified string representation of a number to an equivalent 32-bit unsigned integer. More...
 
static uint ToUInt32 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 32-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static uint ToUInt32 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static long ToInt64 (object value)
 Converts the value of the specified object to a 64-bit signed integer. More...
 
static long ToInt64 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 64-bit signed integer, using the specified culture-specific formatting information. More...
 
static long ToInt64 (bool value)
 Converts the specified Boolean value to the equivalent 64-bit signed integer. More...
 
static long ToInt64 (char value)
 Converts the value of the specified Unicode character to the equivalent 64-bit signed integer. More...
 
static long ToInt64 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 64-bit signed integer. More...
 
static long ToInt64 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 64-bit signed integer. More...
 
static long ToInt64 (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 64-bit signed integer. More...
 
static long ToInt64 (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (long value)
 Returns the specified 64-bit signed integer; no actual conversion is performed. More...
 
static long ToInt64 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (decimal value)
 Converts the value of the specified decimal number to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (string value)
 Converts the specified string representation of a number to an equivalent 64-bit signed integer. More...
 
static long ToInt64 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 64-bit signed integer, using the specified culture-specific formatting information. More...
 
static long ToInt64 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static ulong ToUInt64 (object value)
 Converts the value of the specified object to a 64-bit unsigned integer. More...
 
static ulong ToUInt64 (object value, IFormatProvider provider)
 Converts the value of the specified object to a 64-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static ulong ToUInt64 (bool value)
 Converts the specified Boolean value to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (char value)
 Converts the value of the specified Unicode character to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (short value)
 Converts the value of the specified 16-bit signed integer to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (ulong value)
 Returns the specified 64-bit unsigned integer; no actual conversion is performed. More...
 
static ulong ToUInt64 (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (decimal value)
 Converts the value of the specified decimal number to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (string value)
 Converts the specified string representation of a number to an equivalent 64-bit unsigned integer. More...
 
static ulong ToUInt64 (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent 64-bit unsigned integer, using the specified culture-specific formatting information. More...
 
static ulong ToUInt64 (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static float ToSingle (object value)
 Converts the value of the specified object to a single-precision floating-point number. More...
 
static float ToSingle (object value, IFormatProvider provider)
 Converts the value of the specified object to an single-precision floating-point number, using the specified culture-specific formatting information. More...
 
static float ToSingle (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent single-precision floating-point number. More...
 
static float ToSingle (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent single-precision floating-point number. More...
 
static float ToSingle (char value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static float ToSingle (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent single-precision floating-point number. More...
 
static float ToSingle (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent single-precision floating-point number. More...
 
static float ToSingle (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent single-precision floating-point number. More...
 
static float ToSingle (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent single-precision floating-point number. More...
 
static float ToSingle (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent single-precision floating-point number. More...
 
static float ToSingle (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent single-precision floating-point number. More...
 
static float ToSingle (float value)
 Returns the specified single-precision floating-point number; no actual conversion is performed. More...
 
static float ToSingle (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent single-precision floating-point number. More...
 
static float ToSingle (decimal value)
 Converts the value of the specified decimal number to an equivalent single-precision floating-point number. More...
 
static float ToSingle (string value)
 Converts the specified string representation of a number to an equivalent single-precision floating-point number. More...
 
static float ToSingle (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent single-precision floating-point number, using the specified culture-specific formatting information. More...
 
static float ToSingle (bool value)
 Converts the specified Boolean value to the equivalent single-precision floating-point number. More...
 
static float ToSingle (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static double ToDouble (object value)
 Converts the value of the specified object to a double-precision floating-point number. More...
 
static double ToDouble (object value, IFormatProvider provider)
 Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information. More...
 
static double ToDouble (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent double-precision floating-point number. More...
 
static double ToDouble (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent double-precision floating-point number. More...
 
static double ToDouble (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent double-precision floating-point number. More...
 
static double ToDouble (char value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static double ToDouble (ushort value)
 Converts the value of the specified 16-bit unsigned integer to the equivalent double-precision floating-point number. More...
 
static double ToDouble (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent double-precision floating-point number. More...
 
static double ToDouble (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent double-precision floating-point number. More...
 
static double ToDouble (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent double-precision floating-point number. More...
 
static double ToDouble (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent double-precision floating-point number. More...
 
static double ToDouble (float value)
 Converts the value of the specified single-precision floating-point number to an equivalent double-precision floating-point number. More...
 
static double ToDouble (double value)
 Returns the specified double-precision floating-point number; no actual conversion is performed. More...
 
static double ToDouble (decimal value)
 Converts the value of the specified decimal number to an equivalent double-precision floating-point number. More...
 
static double ToDouble (string value)
 Converts the specified string representation of a number to an equivalent double-precision floating-point number. More...
 
static double ToDouble (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent double-precision floating-point number, using the specified culture-specific formatting information. More...
 
static double ToDouble (bool value)
 Converts the specified Boolean value to the equivalent double-precision floating-point number. More...
 
static double ToDouble (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static decimal ToDecimal (object value)
 Converts the value of the specified object to an equivalent decimal number. More...
 
static decimal ToDecimal (object value, IFormatProvider provider)
 Converts the value of the specified object to an equivalent decimal number, using the specified culture-specific formatting information. More...
 
static decimal ToDecimal (sbyte value)
 Converts the value of the specified 8-bit signed integer to the equivalent decimal number. More...
 
static decimal ToDecimal (byte value)
 Converts the value of the specified 8-bit unsigned integer to the equivalent decimal number. More...
 
static decimal ToDecimal (char value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static decimal ToDecimal (short value)
 Converts the value of the specified 16-bit signed integer to an equivalent decimal number. More...
 
static decimal ToDecimal (ushort value)
 Converts the value of the specified 16-bit unsigned integer to an equivalent decimal number. More...
 
static decimal ToDecimal (int value)
 Converts the value of the specified 32-bit signed integer to an equivalent decimal number. More...
 
static decimal ToDecimal (uint value)
 Converts the value of the specified 32-bit unsigned integer to an equivalent decimal number. More...
 
static decimal ToDecimal (long value)
 Converts the value of the specified 64-bit signed integer to an equivalent decimal number. More...
 
static decimal ToDecimal (ulong value)
 Converts the value of the specified 64-bit unsigned integer to an equivalent decimal number. More...
 
static decimal ToDecimal (float value)
 Converts the value of the specified single-precision floating-point number to the equivalent decimal number. More...
 
static decimal ToDecimal (double value)
 Converts the value of the specified double-precision floating-point number to an equivalent decimal number. More...
 
static decimal ToDecimal (string value)
 Converts the specified string representation of a number to an equivalent decimal number. More...
 
static decimal ToDecimal (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent decimal number, using the specified culture-specific formatting information. More...
 
static decimal ToDecimal (decimal value)
 Returns the specified decimal number; no actual conversion is performed. More...
 
static decimal ToDecimal (bool value)
 Converts the specified Boolean value to the equivalent decimal number. More...
 
static decimal ToDecimal (DateTime value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (DateTime value)
 Returns the specified T:System.DateTime object; no actual conversion is performed. More...
 
static DateTime ToDateTime (object value)
 Converts the value of the specified object to a T:System.DateTime object. More...
 
static DateTime ToDateTime (object value, IFormatProvider provider)
 Converts the value of the specified object to a T:System.DateTime object, using the specified culture-specific formatting information. More...
 
static DateTime ToDateTime (string value)
 Converts the specified string representation of a date and time to an equivalent date and time value. More...
 
static DateTime ToDateTime (string value, IFormatProvider provider)
 Converts the specified string representation of a number to an equivalent date and time, using the specified culture-specific formatting information. More...
 
static DateTime ToDateTime (sbyte value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (byte value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (short value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (ushort value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (int value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (uint value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (long value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (ulong value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (bool value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (char value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (float value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (double value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static DateTime ToDateTime (decimal value)
 Calling this method always throws T:System.InvalidCastException. More...
 
static string ToString (object value)
 Converts the value of the specified object to its equivalent string representation. More...
 
static string ToString (object value, IFormatProvider provider)
 Converts the value of the specified object to its equivalent string representation using the specified culture-specific formatting information. More...
 
static string ToString (bool value)
 Converts the specified Boolean value to its equivalent string representation. More...
 
static string ToString (bool value, IFormatProvider provider)
 Converts the specified Boolean value to its equivalent string representation. More...
 
static string ToString (char value)
 Converts the value of the specified Unicode character to its equivalent string representation. More...
 
static string ToString (char value, IFormatProvider provider)
 Converts the value of the specified Unicode character to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (sbyte value)
 Converts the value of the specified 8-bit signed integer to its equivalent string representation. More...
 
static string ToString (sbyte value, IFormatProvider provider)
 Converts the value of the specified 8-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (byte value)
 Converts the value of the specified 8-bit unsigned integer to its equivalent string representation. More...
 
static string ToString (byte value, IFormatProvider provider)
 Converts the value of the specified 8-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (short value)
 Converts the value of the specified 16-bit signed integer to its equivalent string representation. More...
 
static string ToString (short value, IFormatProvider provider)
 Converts the value of the specified 16-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (ushort value)
 Converts the value of the specified 16-bit unsigned integer to its equivalent string representation. More...
 
static string ToString (ushort value, IFormatProvider provider)
 Converts the value of the specified 16-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (int value)
 Converts the value of the specified 32-bit signed integer to its equivalent string representation. More...
 
static string ToString (int value, IFormatProvider provider)
 Converts the value of the specified 32-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (uint value)
 Converts the value of the specified 32-bit unsigned integer to its equivalent string representation. More...
 
static string ToString (uint value, IFormatProvider provider)
 Converts the value of the specified 32-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (long value)
 Converts the value of the specified 64-bit signed integer to its equivalent string representation. More...
 
static string ToString (long value, IFormatProvider provider)
 Converts the value of the specified 64-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (ulong value)
 Converts the value of the specified 64-bit unsigned integer to its equivalent string representation. More...
 
static string ToString (ulong value, IFormatProvider provider)
 Converts the value of the specified 64-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (float value)
 Converts the value of the specified single-precision floating-point number to its equivalent string representation. More...
 
static string ToString (float value, IFormatProvider provider)
 Converts the value of the specified single-precision floating-point number to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (double value)
 Converts the value of the specified double-precision floating-point number to its equivalent string representation. More...
 
static string ToString (double value, IFormatProvider provider)
 Converts the value of the specified double-precision floating-point number to its equivalent string representation. More...
 
static string ToString (decimal value)
 Converts the value of the specified decimal number to its equivalent string representation. More...
 
static string ToString (decimal value, IFormatProvider provider)
 Converts the value of the specified decimal number to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (DateTime value)
 Converts the value of the specified T:System.DateTime to its equivalent string representation. More...
 
static string ToString (DateTime value, IFormatProvider provider)
 Converts the value of the specified T:System.DateTime to its equivalent string representation, using the specified culture-specific formatting information. More...
 
static string ToString (string value)
 Returns the specified string instance; no actual conversion is performed. More...
 
static string ToString (string value, IFormatProvider provider)
 Returns the specified string instance; no actual conversion is performed. More...
 
static byte ToByte (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 8-bit unsigned integer. More...
 
static sbyte ToSByte (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 8-bit signed integer. More...
 
static short ToInt16 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 16-bit signed integer. More...
 
static ushort ToUInt16 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 16-bit unsigned integer. More...
 
static int ToInt32 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 32-bit signed integer. More...
 
static uint ToUInt32 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 32-bit unsigned integer. More...
 
static long ToInt64 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 64-bit signed integer. More...
 
static ulong ToUInt64 (string value, int fromBase)
 Converts the string representation of a number in a specified base to an equivalent 64-bit unsigned integer. More...
 
static string ToString (byte value, int toBase)
 Converts the value of an 8-bit unsigned integer to its equivalent string representation in a specified base. More...
 
static string ToString (short value, int toBase)
 Converts the value of a 16-bit signed integer to its equivalent string representation in a specified base. More...
 
static string ToString (int value, int toBase)
 Converts the value of a 32-bit signed integer to its equivalent string representation in a specified base. More...
 
static string ToString (long value, int toBase)
 Converts the value of a 64-bit signed integer to its equivalent string representation in a specified base. More...
 
static string ToBase64String (byte[] inArray)
 Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. More...
 
static string ToBase64String (byte[] inArray, Base64FormattingOptions options)
 Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. A parameter specifies whether to insert line breaks in the return value. More...
 
static string ToBase64String (byte[] inArray, int offset, int length)
 Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert. More...
 
static unsafe string ToBase64String (byte[] inArray, int offset, int length, Base64FormattingOptions options)
 Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, the number of elements in the array to convert, and whether to insert line breaks in the return value. More...
 
static int ToBase64CharArray (byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut)
 Converts a subset of an 8-bit unsigned integer array to an equivalent subset of a Unicode character array encoded with base-64 digits. Parameters specify the subsets as offsets in the input and output arrays, and the number of elements in the input array to convert. More...
 
static unsafe int ToBase64CharArray (byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, Base64FormattingOptions options)
 Converts a subset of an 8-bit unsigned integer array to an equivalent subset of a Unicode character array encoded with base-64 digits. Parameters specify the subsets as offsets in the input and output arrays, the number of elements in the input array to convert, and whether line breaks are inserted in the output array. More...
 
static unsafe byte [] FromBase64String (string s)
 Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array. More...
 
static unsafe byte [] FromBase64CharArray (char[] inArray, int offset, int length)
 Converts a subset of a Unicode character array, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array. Parameters specify the subset in the input array and the number of elements to convert. More...
 

Static Public Attributes

static readonly object DBNull = System.DBNull.Value
 A constant that represents a database column that is absent of data; that is, database null. More...
 

Detailed Description

Converts a base data type to another base data type.

Definition at line 10 of file Convert.cs.

Member Function Documentation

◆ ChangeType() [1/4]

static object System.Convert.ChangeType ( object  value,
TypeCode  typeCode 
)
static

Returns an object of the specified type whose value is equivalent to the specified object.

Parameters
valueAn object that implements the T:System.IConvertible interface.
typeCodeThe type of object to return.
Returns
An object whose underlying type is typeCode and whose value is equivalent to value .-or-A null reference (Nothing in Visual Basic), if value is null and typeCode is F:System.TypeCode.Empty, F:System.TypeCode.String, or F:System.TypeCode.Object.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported. -or- value is null and typeCode specifies a value type.-or- value does not implement the T:System.IConvertible interface.
T:System.FormatExceptionvalue is not in a format recognized by the typeCode type.
T:System.OverflowExceptionvalue represents a number that is out of the range of the typeCode type.
T:System.ArgumentExceptiontypeCode is invalid.

Definition at line 155 of file Convert.cs.

◆ ChangeType() [2/4]

static object System.Convert.ChangeType ( object  value,
TypeCode  typeCode,
IFormatProvider  provider 
)
static

Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
typeCodeThe type of object to return.
providerAn object that supplies culture-specific formatting information.
Returns
An object whose underlying type is typeCode and whose value is equivalent to value .-or- A null reference (Nothing in Visual Basic), if value is null and typeCode is F:System.TypeCode.Empty, F:System.TypeCode.String, or F:System.TypeCode.Object.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported. -or- value is null and typeCode specifies a value type.-or- value does not implement the T:System.IConvertible interface.
T:System.FormatExceptionvalue is not in a format for the typeCode type recognized by provider .
T:System.OverflowExceptionvalue represents a number that is out of the range of the typeCode type.
T:System.ArgumentExceptiontypeCode is invalid.

Definition at line 175 of file Convert.cs.

◆ ChangeType() [3/4]

static object System.Convert.ChangeType ( object  value,
Type  conversionType 
)
static

Returns an object of the specified type and whose value is equivalent to the specified object.

Parameters
valueAn object that implements the T:System.IConvertible interface.
conversionTypeThe type of object to return.
Returns
An object whose type is conversionType and whose value is equivalent to value .-or-A null reference (Nothing in Visual Basic), if value is null and conversionType is not a value type.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported. -or- value is null and conversionType is a value type.-or- value does not implement the T:System.IConvertible interface.
T:System.FormatExceptionvalue is not in a format recognized by conversionType .
T:System.OverflowExceptionvalue represents a number that is out of the range of conversionType .
T:System.ArgumentNullExceptionconversionType is null.

Definition at line 336 of file Convert.cs.

◆ ChangeType() [4/4]

static object System.Convert.ChangeType ( object  value,
Type  conversionType,
IFormatProvider  provider 
)
static

Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
conversionTypeThe type of object to return.
providerAn object that supplies culture-specific formatting information.
Returns
An object whose type is conversionType and whose value is equivalent to value .-or- value , if the T:System.Type of value and conversionType are equal.-or- A null reference (Nothing in Visual Basic), if value is null and conversionType is not a value type.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported. -or- value is null and conversionType is a value type.-or- value does not implement the T:System.IConvertible interface.
T:System.FormatExceptionvalue is not in a format for conversionType recognized by provider .
T:System.OverflowExceptionvalue represents a number that is out of the range of conversionType .
T:System.ArgumentNullExceptionconversionType is null.

Definition at line 357 of file Convert.cs.

◆ FromBase64CharArray()

static unsafe byte [] System.Convert.FromBase64CharArray ( char []  inArray,
int  offset,
int  length 
)
static

Converts a subset of a Unicode character array, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array. Parameters specify the subset in the input array and the number of elements to convert.

Parameters
inArrayA Unicode character array.
offsetA position within inArray .
lengthThe number of elements in inArray to convert.
Returns
An array of 8-bit unsigned integers equivalent to length elements at position offset in inArray .
Exceptions
T:System.ArgumentNullExceptioninArray is null.
T:System.ArgumentOutOfRangeExceptionoffset or length is less than 0.-or- offset plus length indicates a position not within inArray .
T:System.FormatExceptionThe length of inArray , ignoring white-space characters, is not zero or a multiple of 4. -or-The format of inArray is invalid. inArray contains a non-base-64 character, more than two padding characters, or a non-white-space character among the padding characters.

Definition at line 4717 of file Convert.cs.

◆ FromBase64String()

static unsafe byte [] System.Convert.FromBase64String ( string  s)
static

Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.

Parameters
sThe string to convert.
Returns
An array of 8-bit unsigned integers that is equivalent to s .
Exceptions
T:System.ArgumentNullExceptions is null.
T:System.FormatExceptionThe length of s , ignoring white-space characters, is not zero or a multiple of 4. -or-The format of s is invalid. s contains a non-base-64 character, more than two padding characters, or a non-white space-character among the padding characters.

Definition at line 4692 of file Convert.cs.

◆ GetTypeCode()

static TypeCode System.Convert.GetTypeCode ( object  value)
static

Returns the T:System.TypeCode for the specified object.

Parameters
valueAn object that implements the T:System.IConvertible interface.
Returns
The T:System.TypeCode for value , or F:System.TypeCode.Empty if value is null.

Definition at line 115 of file Convert.cs.

◆ IsDBNull()

static bool System.Convert.IsDBNull ( object  value)
static

Returns an indication whether the specified object is of type T:System.DBNull.

Parameters
valueAn object.
Returns
true if value is of type T:System.DBNull; otherwise, false.

Definition at line 128 of file Convert.cs.

◆ ToBase64CharArray() [1/2]

static int System.Convert.ToBase64CharArray ( byte []  inArray,
int  offsetIn,
int  length,
char []  outArray,
int  offsetOut 
)
static

Converts a subset of an 8-bit unsigned integer array to an equivalent subset of a Unicode character array encoded with base-64 digits. Parameters specify the subsets as offsets in the input and output arrays, and the number of elements in the input array to convert.

Parameters
inArrayAn input array of 8-bit unsigned integers.
offsetInA position within inArray .
lengthThe number of elements of inArray to convert.
outArrayAn output array of Unicode characters.
offsetOutA position within outArray .
Returns
A 32-bit signed integer containing the number of bytes in outArray .
Exceptions
T:System.ArgumentNullExceptioninArray or outArray is null.
T:System.ArgumentOutOfRangeExceptionoffsetIn , offsetOut , or length is negative.-or- offsetIn plus length is greater than the length of inArray .-or- offsetOut plus the number of elements to return is greater than the length of outArray .

Definition at line 4527 of file Convert.cs.

◆ ToBase64CharArray() [2/2]

static unsafe int System.Convert.ToBase64CharArray ( byte []  inArray,
int  offsetIn,
int  length,
char []  outArray,
int  offsetOut,
Base64FormattingOptions  options 
)
static

Converts a subset of an 8-bit unsigned integer array to an equivalent subset of a Unicode character array encoded with base-64 digits. Parameters specify the subsets as offsets in the input and output arrays, the number of elements in the input array to convert, and whether line breaks are inserted in the output array.

Parameters
inArrayAn input array of 8-bit unsigned integers.
offsetInA position within inArray .
lengthThe number of elements of inArray to convert.
outArrayAn output array of Unicode characters.
offsetOutA position within outArray .
optionsF:System.Base64FormattingOptions.InsertLineBreaks to insert a line break every 76 characters, or F:System.Base64FormattingOptions.None to not insert line breaks.
Returns
A 32-bit signed integer containing the number of bytes in outArray .
Exceptions
T:System.ArgumentNullExceptioninArray or outArray is null.
T:System.ArgumentOutOfRangeExceptionoffsetIn , offsetOut , or length is negative.-or- offsetIn plus length is greater than the length of inArray .-or- offsetOut plus the number of elements to return is greater than the length of outArray .
T:System.ArgumentExceptionoptions is not a valid T:System.Base64FormattingOptions value.

Definition at line 4551 of file Convert.cs.

◆ ToBase64String() [1/4]

static string System.Convert.ToBase64String ( byte []  inArray)
static

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.

Parameters
inArrayAn array of 8-bit unsigned integers.
Returns
The string representation, in base 64, of the contents of inArray .
Exceptions
T:System.ArgumentNullExceptioninArray is null.

Definition at line 4413 of file Convert.cs.

◆ ToBase64String() [2/4]

static string System.Convert.ToBase64String ( byte []  inArray,
Base64FormattingOptions  options 
)
static

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. A parameter specifies whether to insert line breaks in the return value.

Parameters
inArrayAn array of 8-bit unsigned integers.
optionsF:System.Base64FormattingOptions.InsertLineBreaks to insert a line break every 76 characters, or F:System.Base64FormattingOptions.None to not insert line breaks.
Returns
The string representation in base 64 of the elements in inArray .
Exceptions
T:System.ArgumentNullExceptioninArray is null.
T:System.ArgumentExceptionoptions is not a valid T:System.Base64FormattingOptions value.

Definition at line 4432 of file Convert.cs.

◆ ToBase64String() [3/4]

static string System.Convert.ToBase64String ( byte []  inArray,
int  offset,
int  length 
)
static

Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert.

Parameters
inArrayAn array of 8-bit unsigned integers.
offsetAn offset in inArray .
lengthThe number of elements of inArray to convert.
Returns
The string representation in base 64 of length elements of inArray , starting at position offset .
Exceptions
T:System.ArgumentNullExceptioninArray is null.
T:System.ArgumentOutOfRangeExceptionoffset or length is negative.-or- offset plus length is greater than the length of inArray .

Definition at line 4452 of file Convert.cs.

◆ ToBase64String() [4/4]

static unsafe string System.Convert.ToBase64String ( byte []  inArray,
int  offset,
int  length,
Base64FormattingOptions  options 
)
static

Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, the number of elements in the array to convert, and whether to insert line breaks in the return value.

Parameters
inArrayAn array of 8-bit unsigned integers.
offsetAn offset in inArray .
lengthThe number of elements of inArray to convert.
optionsF:System.Base64FormattingOptions.InsertLineBreaks to insert a line break every 76 characters, or F:System.Base64FormattingOptions.None to not insert line breaks.
Returns
The string representation in base 64 of length elements of inArray , starting at position offset .
Exceptions
T:System.ArgumentNullExceptioninArray is null.
T:System.ArgumentOutOfRangeExceptionoffset or length is negative.-or- offset plus length is greater than the length of inArray .
T:System.ArgumentExceptionoptions is not a valid T:System.Base64FormattingOptions value.

Definition at line 4473 of file Convert.cs.

◆ ToBoolean() [1/18]

static bool System.Convert.ToBoolean ( object  value)
static

Converts the value of a specified object to an equivalent Boolean value.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
true or false, which reflects the value returned by invoking the M:System.IConvertible.ToBoolean(System.IFormatProvider) method for the underlying type of value . If value is null, the method returns false.
Exceptions
T:System.FormatExceptionvalue is a string that does not equal F:System.Boolean.TrueString or F:System.Boolean.FalseString.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.-or-The conversion of value to a T:System.Boolean is not supported.

Definition at line 457 of file Convert.cs.

◆ ToBoolean() [2/18]

static bool System.Convert.ToBoolean ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an equivalent Boolean value, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
providerAn object that supplies culture-specific formatting information.
Returns
true or false, which reflects the value returned by invoking the M:System.IConvertible.ToBoolean(System.IFormatProvider) method for the underlying type of value . If value is null, the method returns false.
Exceptions
T:System.FormatExceptionvalue is a string that does not equal F:System.Boolean.TrueString or F:System.Boolean.FalseString.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.-or-The conversion of value to a T:System.Boolean is not supported.

Definition at line 476 of file Convert.cs.

◆ ToBoolean() [3/18]

static bool System.Convert.ToBoolean ( bool  value)
static

Returns the specified Boolean value; no actual conversion is performed.

Parameters
valueThe Boolean value to return.
Returns
value is returned unchanged.

Definition at line 490 of file Convert.cs.

◆ ToBoolean() [4/18]

static bool System.Convert.ToBoolean ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to an equivalent Boolean value.

Parameters
valueThe 8-bit signed integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 501 of file Convert.cs.

◆ ToBoolean() [5/18]

static bool System.Convert.ToBoolean ( char  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Unicode character to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 510 of file Convert.cs.

◆ ToBoolean() [6/18]

static bool System.Convert.ToBoolean ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to an equivalent Boolean value.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 520 of file Convert.cs.

◆ ToBoolean() [7/18]

static bool System.Convert.ToBoolean ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent Boolean value.

Parameters
valueThe 16-bit signed integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 530 of file Convert.cs.

◆ ToBoolean() [8/18]

static bool System.Convert.ToBoolean ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to an equivalent Boolean value.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 541 of file Convert.cs.

◆ ToBoolean() [9/18]

static bool System.Convert.ToBoolean ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent Boolean value.

Parameters
valueThe 32-bit signed integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 551 of file Convert.cs.

◆ ToBoolean() [10/18]

static bool System.Convert.ToBoolean ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent Boolean value.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 562 of file Convert.cs.

◆ ToBoolean() [11/18]

static bool System.Convert.ToBoolean ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent Boolean value.

Parameters
valueThe 64-bit signed integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 572 of file Convert.cs.

◆ ToBoolean() [12/18]

static bool System.Convert.ToBoolean ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent Boolean value.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 583 of file Convert.cs.

◆ ToBoolean() [13/18]

static bool System.Convert.ToBoolean ( string  value)
static

Converts the specified string representation of a logical value to its Boolean equivalent.

Parameters
valueA string that contains the value of either F:System.Boolean.TrueString or F:System.Boolean.FalseString.
Returns
true if value equals F:System.Boolean.TrueString, or false if value equals F:System.Boolean.FalseString or null.
Exceptions
T:System.FormatExceptionvalue is not equal to F:System.Boolean.TrueString or F:System.Boolean.FalseString.

Definition at line 595 of file Convert.cs.

◆ ToBoolean() [14/18]

static bool System.Convert.ToBoolean ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a logical value to its Boolean equivalent, using the specified culture-specific formatting information.

Parameters
valueA string that contains the value of either F:System.Boolean.TrueString or F:System.Boolean.FalseString.
providerAn object that supplies culture-specific formatting information. This parameter is ignored.
Returns
true if value equals F:System.Boolean.TrueString, or false if value equals F:System.Boolean.FalseString or null.
Exceptions
T:System.FormatExceptionvalue is not equal to F:System.Boolean.TrueString or F:System.Boolean.FalseString.

Definition at line 612 of file Convert.cs.

◆ ToBoolean() [15/18]

static bool System.Convert.ToBoolean ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent Boolean value.

Parameters
valueThe single-precision floating-point number to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 626 of file Convert.cs.

◆ ToBoolean() [16/18]

static bool System.Convert.ToBoolean ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent Boolean value.

Parameters
valueThe double-precision floating-point number to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 636 of file Convert.cs.

◆ ToBoolean() [17/18]

static bool System.Convert.ToBoolean ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent Boolean value.

Parameters
valueThe number to convert.
Returns
true if value is not zero; otherwise, false.

Definition at line 646 of file Convert.cs.

◆ ToBoolean() [18/18]

static bool System.Convert.ToBoolean ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 655 of file Convert.cs.

◆ ToByte() [1/19]

static byte System.Convert.ToByte ( object  value)
static

Converts the value of the specified object to an 8-bit unsigned integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
An 8-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in the property format for a T:System.Byte value.
T:System.InvalidCastExceptionvalue does not implement T:System.IConvertible. -or-Conversion from value to the T:System.Byte type is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1186 of file Convert.cs.

◆ ToByte() [2/19]

static byte System.Convert.ToByte ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an 8-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
An 8-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in the property format for a T:System.Byte value.
T:System.InvalidCastExceptionvalue does not implement T:System.IConvertible. -or-Conversion from value to the T:System.Byte type is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1206 of file Convert.cs.

◆ ToByte() [3/19]

static byte System.Convert.ToByte ( bool  value)
static

Converts the specified Boolean value to the equivalent 8-bit unsigned integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 1219 of file Convert.cs.

◆ ToByte() [4/19]

static byte System.Convert.ToByte ( byte  value)
static

Returns the specified 8-bit unsigned integer; no actual conversion is performed.

Parameters
valueThe 8-bit unsigned integer to return.
Returns
value is returned unchanged.

Definition at line 1233 of file Convert.cs.

◆ ToByte() [5/19]

static byte System.Convert.ToByte ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 8-bit unsigned integer.

Parameters
valueThe Unicode character to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue represents a number that is greater than F:System.Byte.MaxValue.

Definition at line 1244 of file Convert.cs.

◆ ToByte() [6/19]

static byte System.Convert.ToByte ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 8-bit signed integer to be converted.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Byte.MinValue.

Definition at line 1260 of file Convert.cs.

◆ ToByte() [7/19]

static byte System.Convert.ToByte ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1275 of file Convert.cs.

◆ ToByte() [8/19]

static byte System.Convert.ToByte ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue.

Definition at line 1291 of file Convert.cs.

◆ ToByte() [9/19]

static byte System.Convert.ToByte ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1306 of file Convert.cs.

◆ ToByte() [10/19]

static byte System.Convert.ToByte ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue.

Definition at line 1322 of file Convert.cs.

◆ ToByte() [11/19]

static byte System.Convert.ToByte ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1337 of file Convert.cs.

◆ ToByte() [12/19]

static byte System.Convert.ToByte ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 8-bit unsigned integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
An 8-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue.

Definition at line 1353 of file Convert.cs.

◆ ToByte() [13/19]

static byte System.Convert.ToByte ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 8-bit unsigned integer.

Parameters
valueA single-precision floating-point number.
Returns
value , rounded to the nearest 8-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue or less than F:System.Byte.MinValue.

Definition at line 1369 of file Convert.cs.

◆ ToByte() [14/19]

static byte System.Convert.ToByte ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 8-bit unsigned integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 8-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue or less than F:System.Byte.MinValue.

Definition at line 1381 of file Convert.cs.

◆ ToByte() [15/19]

static byte System.Convert.ToByte ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 8-bit unsigned integer.

Parameters
valueThe number to convert.
Returns
value , rounded to the nearest 8-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Byte.MaxValue or less than F:System.Byte.MinValue.

Definition at line 1393 of file Convert.cs.

◆ ToByte() [16/19]

static byte System.Convert.ToByte ( string  value)
static

Converts the specified string representation of a number to an equivalent 8-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
Returns
An 8-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1406 of file Convert.cs.

◆ ToByte() [17/19]

static byte System.Convert.ToByte ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 8-bit unsigned integer, using specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
An 8-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 1424 of file Convert.cs.

◆ ToByte() [18/19]

static byte System.Convert.ToByte ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 1437 of file Convert.cs.

◆ ToByte() [19/19]

static byte System.Convert.ToByte ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 8-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
An 8-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 unsigned number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a base 10 unsigned number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue.

Definition at line 4130 of file Convert.cs.

◆ ToChar() [1/18]

static char System.Convert.ToChar ( object  value)
static

Converts the value of the specified object to a Unicode character.

Parameters
valueAn object that implements the T:System.IConvertible interface.
Returns
A Unicode character that is equivalent to value, or F:System.Char.MinValue if value is null.
Exceptions
T:System.ArgumentNullExceptionvalue is a null string.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.-or-The conversion of value to a T:System.Char is not supported.
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue or greater than F:System.Char.MaxValue.

Definition at line 670 of file Convert.cs.

◆ ToChar() [2/18]

static char System.Convert.ToChar ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to its equivalent Unicode character, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A Unicode character that is equivalent to value , or F:System.Char.MinValue if value is null.
Exceptions
T:System.ArgumentNullExceptionvalue is a null string.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion of value to a T:System.Char is not supported.
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue or greater than F:System.Char.MaxValue.

Definition at line 690 of file Convert.cs.

◆ ToChar() [3/18]

static char System.Convert.ToChar ( bool  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Boolean value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 703 of file Convert.cs.

◆ ToChar() [4/18]

static char System.Convert.ToChar ( char  value)
static

Returns the specified Unicode character value; no actual conversion is performed.

Parameters
valueThe Unicode character to return.
Returns
value is returned unchanged.

Definition at line 712 of file Convert.cs.

◆ ToChar() [5/18]

static char System.Convert.ToChar ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to its equivalent Unicode character.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue.

Definition at line 724 of file Convert.cs.

◆ ToChar() [6/18]

static char System.Convert.ToChar ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to its equivalent Unicode character.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A Unicode character that is equivalent to value .

Definition at line 737 of file Convert.cs.

◆ ToChar() [7/18]

static char System.Convert.ToChar ( short  value)
static

Converts the value of the specified 16-bit signed integer to its equivalent Unicode character.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue.

Definition at line 748 of file Convert.cs.

◆ ToChar() [8/18]

static char System.Convert.ToChar ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to its equivalent Unicode character.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A Unicode character that is equivalent to value .

Definition at line 762 of file Convert.cs.

◆ ToChar() [9/18]

static char System.Convert.ToChar ( int  value)
static

Converts the value of the specified 32-bit signed integer to its equivalent Unicode character.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue or greater than F:System.Char.MaxValue.

Definition at line 773 of file Convert.cs.

◆ ToChar() [10/18]

static char System.Convert.ToChar ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to its equivalent Unicode character.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Char.MaxValue.

Definition at line 789 of file Convert.cs.

◆ ToChar() [11/18]

static char System.Convert.ToChar ( long  value)
static

Converts the value of the specified 64-bit signed integer to its equivalent Unicode character.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than F:System.Char.MinValue or greater than F:System.Char.MaxValue.

Definition at line 804 of file Convert.cs.

◆ ToChar() [12/18]

static char System.Convert.ToChar ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to its equivalent Unicode character.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A Unicode character that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Char.MaxValue.

Definition at line 820 of file Convert.cs.

◆ ToChar() [13/18]

static char System.Convert.ToChar ( string  value)
static

Converts the first character of a specified string to a Unicode character.

Parameters
valueA string of length 1.
Returns
A Unicode character that is equivalent to the first and only character in value .
Exceptions
T:System.ArgumentNullExceptionvalue is null.
T:System.FormatExceptionThe length of value is not 1.

Definition at line 836 of file Convert.cs.

◆ ToChar() [14/18]

static char System.Convert.ToChar ( string  value,
IFormatProvider  provider 
)
static

Converts the first character of a specified string to a Unicode character, using specified culture-specific formatting information.

Parameters
valueA string of length 1 or null.
providerAn object that supplies culture-specific formatting information. This parameter is ignored.
Returns
A Unicode character that is equivalent to the first and only character in value .
Exceptions
T:System.ArgumentNullExceptionvalue is null.
T:System.FormatExceptionThe length of value is not 1.

Definition at line 849 of file Convert.cs.

◆ ToChar() [15/18]

static char System.Convert.ToChar ( float  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe single-precision floating-point number to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 866 of file Convert.cs.

◆ ToChar() [16/18]

static char System.Convert.ToChar ( double  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe double-precision floating-point number to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 875 of file Convert.cs.

◆ ToChar() [17/18]

static char System.Convert.ToChar ( decimal  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe decimal number to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 884 of file Convert.cs.

◆ ToChar() [18/18]

static char System.Convert.ToChar ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 893 of file Convert.cs.

◆ ToDateTime() [1/18]

static DateTime System.Convert.ToDateTime ( DateTime  value)
static

Returns the specified T:System.DateTime object; no actual conversion is performed.

Parameters
valueA date and time value.
Returns
value is returned unchanged.

Definition at line 3597 of file Convert.cs.

◆ ToDateTime() [2/18]

static DateTime System.Convert.ToDateTime ( object  value)
static

Converts the value of the specified object to a T:System.DateTime object.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
The date and time equivalent of the value of value , or a date and time equivalent of F:System.DateTime.MinValue if value is null.
Exceptions
T:System.FormatExceptionvalue is not a valid date and time value.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.

Definition at line 3610 of file Convert.cs.

◆ ToDateTime() [3/18]

static DateTime System.Convert.ToDateTime ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a T:System.DateTime object, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
The date and time equivalent of the value of value , or the date and time equivalent of F:System.DateTime.MinValue if value is null.
Exceptions
T:System.FormatExceptionvalue is not a valid date and time value.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.

Definition at line 3628 of file Convert.cs.

◆ ToDateTime() [4/18]

static DateTime System.Convert.ToDateTime ( string  value)
static

Converts the specified string representation of a date and time to an equivalent date and time value.

Parameters
valueThe string representation of a date and time.
Returns
The date and time equivalent of the value of value , or the date and time equivalent of F:System.DateTime.MinValue if value is null.
Exceptions
T:System.FormatExceptionvalue is not a properly formatted date and time string.

Definition at line 3643 of file Convert.cs.

◆ ToDateTime() [5/18]

static DateTime System.Convert.ToDateTime ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent date and time, using the specified culture-specific formatting information.

Parameters
valueA string that contains a date and time to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The date and time equivalent of the value of value , or the date and time equivalent of F:System.DateTime.MinValue if value is null.
Exceptions
T:System.FormatExceptionvalue is not a properly formatted date and time string.

Definition at line 3659 of file Convert.cs.

◆ ToDateTime() [6/18]

static DateTime System.Convert.ToDateTime ( sbyte  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 8-bit signed integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3673 of file Convert.cs.

◆ ToDateTime() [7/18]

static DateTime System.Convert.ToDateTime ( byte  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3682 of file Convert.cs.

◆ ToDateTime() [8/18]

static DateTime System.Convert.ToDateTime ( short  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 16-bit signed integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3691 of file Convert.cs.

◆ ToDateTime() [9/18]

static DateTime System.Convert.ToDateTime ( ushort  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3701 of file Convert.cs.

◆ ToDateTime() [10/18]

static DateTime System.Convert.ToDateTime ( int  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 32-bit signed integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3710 of file Convert.cs.

◆ ToDateTime() [11/18]

static DateTime System.Convert.ToDateTime ( uint  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3720 of file Convert.cs.

◆ ToDateTime() [12/18]

static DateTime System.Convert.ToDateTime ( long  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 64-bit signed integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3729 of file Convert.cs.

◆ ToDateTime() [13/18]

static DateTime System.Convert.ToDateTime ( ulong  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3739 of file Convert.cs.

◆ ToDateTime() [14/18]

static DateTime System.Convert.ToDateTime ( bool  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Boolean value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3748 of file Convert.cs.

◆ ToDateTime() [15/18]

static DateTime System.Convert.ToDateTime ( char  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Unicode character to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3757 of file Convert.cs.

◆ ToDateTime() [16/18]

static DateTime System.Convert.ToDateTime ( float  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe single-precision floating-point value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3766 of file Convert.cs.

◆ ToDateTime() [17/18]

static DateTime System.Convert.ToDateTime ( double  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe double-precision floating-point value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3775 of file Convert.cs.

◆ ToDateTime() [18/18]

static DateTime System.Convert.ToDateTime ( decimal  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe number to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3784 of file Convert.cs.

◆ ToDecimal() [1/18]

static decimal System.Convert.ToDecimal ( object  value)
static

Converts the value of the specified object to an equivalent decimal number.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A decimal number that is equivalent to value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for a T:System.Decimal type.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.

Definition at line 3394 of file Convert.cs.

◆ ToDecimal() [2/18]

static decimal System.Convert.ToDecimal ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an equivalent decimal number, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A decimal number that is equivalent to value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for a T:System.Decimal type.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.-or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.

Definition at line 3414 of file Convert.cs.

◆ ToDecimal() [3/18]

static decimal System.Convert.ToDecimal ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent decimal number.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3428 of file Convert.cs.

◆ ToDecimal() [4/18]

static decimal System.Convert.ToDecimal ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent decimal number.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
The decimal number that is equivalent to value .

Definition at line 3437 of file Convert.cs.

◆ ToDecimal() [5/18]

static decimal System.Convert.ToDecimal ( char  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Unicode character to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3446 of file Convert.cs.

◆ ToDecimal() [6/18]

static decimal System.Convert.ToDecimal ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent decimal number.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3455 of file Convert.cs.

◆ ToDecimal() [7/18]

static decimal System.Convert.ToDecimal ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to an equivalent decimal number.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
The decimal number that is equivalent to value .

Definition at line 3465 of file Convert.cs.

◆ ToDecimal() [8/18]

static decimal System.Convert.ToDecimal ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent decimal number.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3474 of file Convert.cs.

◆ ToDecimal() [9/18]

static decimal System.Convert.ToDecimal ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent decimal number.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3484 of file Convert.cs.

◆ ToDecimal() [10/18]

static decimal System.Convert.ToDecimal ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent decimal number.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3493 of file Convert.cs.

◆ ToDecimal() [11/18]

static decimal System.Convert.ToDecimal ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent decimal number.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A decimal number that is equivalent to value .

Definition at line 3503 of file Convert.cs.

◆ ToDecimal() [12/18]

static decimal System.Convert.ToDecimal ( float  value)
static

Converts the value of the specified single-precision floating-point number to the equivalent decimal number.

Parameters
valueThe single-precision floating-point number to convert.
Returns
A decimal number that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Decimal.MaxValue or less than F:System.Decimal.MinValue.

Definition at line 3514 of file Convert.cs.

◆ ToDecimal() [13/18]

static decimal System.Convert.ToDecimal ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent decimal number.

Parameters
valueThe double-precision floating-point number to convert.
Returns
A decimal number that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Decimal.MaxValue or less than F:System.Decimal.MinValue.

Definition at line 3525 of file Convert.cs.

◆ ToDecimal() [14/18]

static decimal System.Convert.ToDecimal ( string  value)
static

Converts the specified string representation of a number to an equivalent decimal number.

Parameters
valueA string that contains a number to convert.
Returns
A decimal number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.

Definition at line 3538 of file Convert.cs.

◆ ToDecimal() [15/18]

static decimal System.Convert.ToDecimal ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent decimal number, using the specified culture-specific formatting information.

Parameters
valueA string that contains a number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A decimal number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.

Definition at line 3556 of file Convert.cs.

◆ ToDecimal() [16/18]

static decimal System.Convert.ToDecimal ( decimal  value)
static

Returns the specified decimal number; no actual conversion is performed.

Parameters
valueA decimal number.
Returns
value is returned unchanged.

Definition at line 3570 of file Convert.cs.

◆ ToDecimal() [17/18]

static decimal System.Convert.ToDecimal ( bool  value)
static

Converts the specified Boolean value to the equivalent decimal number.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 3579 of file Convert.cs.

◆ ToDecimal() [18/18]

static decimal System.Convert.ToDecimal ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3588 of file Convert.cs.

◆ ToDouble() [1/18]

static double System.Convert.ToDouble ( object  value)
static

Converts the value of the specified object to a double-precision floating-point number.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A double-precision floating-point number that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for a T:System.Double type.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue.

Definition at line 3189 of file Convert.cs.

◆ ToDouble() [2/18]

static double System.Convert.ToDouble ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A double-precision floating-point number that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for a T:System.Double type.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue.

Definition at line 3209 of file Convert.cs.

◆ ToDouble() [3/18]

static double System.Convert.ToDouble ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent double-precision floating-point number.

Parameters
valueThe 8-bit signed integer to convert.
Returns
The 8-bit signed integer that is equivalent to value .

Definition at line 3223 of file Convert.cs.

◆ ToDouble() [4/18]

static double System.Convert.ToDouble ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent double-precision floating-point number.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
The double-precision floating-point number that is equivalent to value .

Definition at line 3232 of file Convert.cs.

◆ ToDouble() [5/18]

static double System.Convert.ToDouble ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent double-precision floating-point number.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A double-precision floating-point number equivalent to value .

Definition at line 3241 of file Convert.cs.

◆ ToDouble() [6/18]

static double System.Convert.ToDouble ( char  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Unicode character to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3250 of file Convert.cs.

◆ ToDouble() [7/18]

static double System.Convert.ToDouble ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent double-precision floating-point number.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3260 of file Convert.cs.

◆ ToDouble() [8/18]

static double System.Convert.ToDouble ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent double-precision floating-point number.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3269 of file Convert.cs.

◆ ToDouble() [9/18]

static double System.Convert.ToDouble ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent double-precision floating-point number.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3279 of file Convert.cs.

◆ ToDouble() [10/18]

static double System.Convert.ToDouble ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent double-precision floating-point number.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3288 of file Convert.cs.

◆ ToDouble() [11/18]

static double System.Convert.ToDouble ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent double-precision floating-point number.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3298 of file Convert.cs.

◆ ToDouble() [12/18]

static double System.Convert.ToDouble ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent double-precision floating-point number.

Parameters
valueThe single-precision floating-point number.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3307 of file Convert.cs.

◆ ToDouble() [13/18]

static double System.Convert.ToDouble ( double  value)
static

Returns the specified double-precision floating-point number; no actual conversion is performed.

Parameters
valueThe double-precision floating-point number to return.
Returns
value is returned unchanged.

Definition at line 3317 of file Convert.cs.

◆ ToDouble() [14/18]

static double System.Convert.ToDouble ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent double-precision floating-point number.

Parameters
valueThe decimal number to convert.
Returns
A double-precision floating-point number that is equivalent to value .

Definition at line 3326 of file Convert.cs.

◆ ToDouble() [15/18]

static double System.Convert.ToDouble ( string  value)
static

Converts the specified string representation of a number to an equivalent double-precision floating-point number.

Parameters
valueA string that contains the number to convert.
Returns
A double-precision floating-point number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue.

Definition at line 3339 of file Convert.cs.

◆ ToDouble() [16/18]

static double System.Convert.ToDouble ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent double-precision floating-point number, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A double-precision floating-point number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Double.MinValue or greater than F:System.Double.MaxValue.

Definition at line 3357 of file Convert.cs.

◆ ToDouble() [17/18]

static double System.Convert.ToDouble ( bool  value)
static

Converts the specified Boolean value to the equivalent double-precision floating-point number.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 3370 of file Convert.cs.

◆ ToDouble() [18/18]

static double System.Convert.ToDouble ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3379 of file Convert.cs.

◆ ToInt16() [1/19]

static short System.Convert.ToInt16 ( object  value)
static

Converts the value of the specified object to a 16-bit signed integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 16-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for an T:System.Int16 type.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue.

Definition at line 1452 of file Convert.cs.

◆ ToInt16() [2/19]

static short System.Convert.ToInt16 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 16-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 16-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format for an T:System.Int16 type.
T:System.InvalidCastExceptionvalue does not implement T:System.IConvertible.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue.

Definition at line 1472 of file Convert.cs.

◆ ToInt16() [3/19]

static short System.Convert.ToInt16 ( bool  value)
static

Converts the specified Boolean value to the equivalent 16-bit signed integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 1485 of file Convert.cs.

◆ ToInt16() [4/19]

static short System.Convert.ToInt16 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 16-bit signed integer.

Parameters
valueThe Unicode character to convert.
Returns
A 16-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue.

Definition at line 1500 of file Convert.cs.

◆ ToInt16() [5/19]

static short System.Convert.ToInt16 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 16-bit signed integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 8-bit signed integer that is equivalent to value .

Definition at line 1514 of file Convert.cs.

◆ ToInt16() [6/19]

static short System.Convert.ToInt16 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 16-bit signed integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 16-bit signed integer that is equivalent to value .

Definition at line 1523 of file Convert.cs.

◆ ToInt16() [7/19]

static short System.Convert.ToInt16 ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 16-bit signed integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A 16-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue.

Definition at line 1535 of file Convert.cs.

◆ ToInt16() [8/19]

static short System.Convert.ToInt16 ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 16-bit signed integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
The 16-bit signed integer equivalent of value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue or less than F:System.Int16.MinValue.

Definition at line 1550 of file Convert.cs.

◆ ToInt16() [9/19]

static short System.Convert.ToInt16 ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 16-bit signed integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A 16-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue.

Definition at line 1566 of file Convert.cs.

◆ ToInt16() [10/19]

static short System.Convert.ToInt16 ( short  value)
static

Returns the specified 16-bit signed integer; no actual conversion is performed.

Parameters
valueThe 16-bit signed integer to return.
Returns
value is returned unchanged.

Definition at line 1580 of file Convert.cs.

◆ ToInt16() [11/19]

static short System.Convert.ToInt16 ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 16-bit signed integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A 16-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue or less than F:System.Int16.MinValue.

Definition at line 1591 of file Convert.cs.

◆ ToInt16() [12/19]

static short System.Convert.ToInt16 ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 16-bit signed integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A 16-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue.

Definition at line 1607 of file Convert.cs.

◆ ToInt16() [13/19]

static short System.Convert.ToInt16 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 16-bit signed integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 16-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue or less than F:System.Int16.MinValue.

Definition at line 1623 of file Convert.cs.

◆ ToInt16() [14/19]

static short System.Convert.ToInt16 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 16-bit signed integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 16-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue or less than F:System.Int16.MinValue.

Definition at line 1635 of file Convert.cs.

◆ ToInt16() [15/19]

static short System.Convert.ToInt16 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 16-bit signed integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 16-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int16.MaxValue or less than F:System.Int16.MinValue.

Definition at line 1647 of file Convert.cs.

◆ ToInt16() [16/19]

static short System.Convert.ToInt16 ( string  value)
static

Converts the specified string representation of a number to an equivalent 16-bit signed integer.

Parameters
valueA string that contains the number to convert.
Returns
A 16-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue.

Definition at line 1660 of file Convert.cs.

◆ ToInt16() [17/19]

static short System.Convert.ToInt16 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 16-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 16-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue.

Definition at line 1678 of file Convert.cs.

◆ ToInt16() [18/19]

static short System.Convert.ToInt16 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 1691 of file Convert.cs.

◆ ToInt16() [19/19]

static short System.Convert.ToInt16 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 16-bit signed integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 16-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 signed number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 signed number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue.

Definition at line 4193 of file Convert.cs.

◆ ToInt32() [1/19]

static int System.Convert.ToInt32 ( object  value)
static

Converts the value of the specified object to a 32-bit signed integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 32-bit signed integer equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue.

Definition at line 1974 of file Convert.cs.

◆ ToInt32() [2/19]

static int System.Convert.ToInt32 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 32-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 32-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement T:System.IConvertible.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue.

Definition at line 1994 of file Convert.cs.

◆ ToInt32() [3/19]

static int System.Convert.ToInt32 ( bool  value)
static

Converts the specified Boolean value to the equivalent 32-bit signed integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 2007 of file Convert.cs.

◆ ToInt32() [4/19]

static int System.Convert.ToInt32 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 32-bit signed integer.

Parameters
valueThe Unicode character to convert.
Returns
A 32-bit signed integer that is equivalent to value .

Definition at line 2020 of file Convert.cs.

◆ ToInt32() [5/19]

static int System.Convert.ToInt32 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 32-bit signed integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 8-bit signed integer that is equivalent to value .

Definition at line 2030 of file Convert.cs.

◆ ToInt32() [6/19]

static int System.Convert.ToInt32 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 32-bit signed integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .

Definition at line 2039 of file Convert.cs.

◆ ToInt32() [7/19]

static int System.Convert.ToInt32 ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent 32-bit signed integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .

Definition at line 2048 of file Convert.cs.

◆ ToInt32() [8/19]

static int System.Convert.ToInt32 ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 32-bit signed integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .

Definition at line 2058 of file Convert.cs.

◆ ToInt32() [9/19]

static int System.Convert.ToInt32 ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 32-bit signed integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue.

Definition at line 2070 of file Convert.cs.

◆ ToInt32() [10/19]

static int System.Convert.ToInt32 ( int  value)
static

Returns the specified 32-bit signed integer; no actual conversion is performed.

Parameters
valueThe 32-bit signed integer to return.
Returns
value is returned unchanged.

Definition at line 2084 of file Convert.cs.

◆ ToInt32() [11/19]

static int System.Convert.ToInt32 ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 32-bit signed integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue or less than F:System.Int32.MinValue.

Definition at line 2095 of file Convert.cs.

◆ ToInt32() [12/19]

static int System.Convert.ToInt32 ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 32-bit signed integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A 32-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue.

Definition at line 2111 of file Convert.cs.

◆ ToInt32() [13/19]

static int System.Convert.ToInt32 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 32-bit signed integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 32-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue or less than F:System.Int32.MinValue.

Definition at line 2127 of file Convert.cs.

◆ ToInt32() [14/19]

static int System.Convert.ToInt32 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 32-bit signed integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 32-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue or less than F:System.Int32.MinValue.

Definition at line 2139 of file Convert.cs.

◆ ToInt32() [15/19]

static int System.Convert.ToInt32 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 32-bit signed integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 32-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int32.MaxValue or less than F:System.Int32.MinValue.

Definition at line 2175 of file Convert.cs.

◆ ToInt32() [16/19]

static int System.Convert.ToInt32 ( string  value)
static

Converts the specified string representation of a number to an equivalent 32-bit signed integer.

Parameters
valueA string that contains the number to convert.
Returns
A 32-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue.

Definition at line 2188 of file Convert.cs.

◆ ToInt32() [17/19]

static int System.Convert.ToInt32 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 32-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 32-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue.

Definition at line 2206 of file Convert.cs.

◆ ToInt32() [18/19]

static int System.Convert.ToInt32 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 2219 of file Convert.cs.

◆ ToInt32() [19/19]

static int System.Convert.ToInt32 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 32-bit signed integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 32-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 signed number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 signed number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue.

Definition at line 4256 of file Convert.cs.

◆ ToInt64() [1/19]

static long System.Convert.ToInt64 ( object  value)
static

Converts the value of the specified object to a 64-bit signed integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 64-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue.

Definition at line 2506 of file Convert.cs.

◆ ToInt64() [2/19]

static long System.Convert.ToInt64 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 64-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 64-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface.-or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue.

Definition at line 2526 of file Convert.cs.

◆ ToInt64() [3/19]

static long System.Convert.ToInt64 ( bool  value)
static

Converts the specified Boolean value to the equivalent 64-bit signed integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 2539 of file Convert.cs.

◆ ToInt64() [4/19]

static long System.Convert.ToInt64 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 64-bit signed integer.

Parameters
valueThe Unicode character to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2548 of file Convert.cs.

◆ ToInt64() [5/19]

static long System.Convert.ToInt64 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 64-bit signed integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2558 of file Convert.cs.

◆ ToInt64() [6/19]

static long System.Convert.ToInt64 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 64-bit signed integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2567 of file Convert.cs.

◆ ToInt64() [7/19]

static long System.Convert.ToInt64 ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent 64-bit signed integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2576 of file Convert.cs.

◆ ToInt64() [8/19]

static long System.Convert.ToInt64 ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 64-bit signed integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2586 of file Convert.cs.

◆ ToInt64() [9/19]

static long System.Convert.ToInt64 ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 64-bit signed integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2595 of file Convert.cs.

◆ ToInt64() [10/19]

static long System.Convert.ToInt64 ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 64-bit signed integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2605 of file Convert.cs.

◆ ToInt64() [11/19]

static long System.Convert.ToInt64 ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 64-bit signed integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int64.MaxValue.

Definition at line 2617 of file Convert.cs.

◆ ToInt64() [12/19]

static long System.Convert.ToInt64 ( long  value)
static

Returns the specified 64-bit signed integer; no actual conversion is performed.

Parameters
valueA 64-bit signed integer.
Returns
value is returned unchanged.

Definition at line 2631 of file Convert.cs.

◆ ToInt64() [13/19]

static long System.Convert.ToInt64 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 64-bit signed integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 64-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int64.MaxValue or less than F:System.Int64.MinValue.

Definition at line 2643 of file Convert.cs.

◆ ToInt64() [14/19]

static long System.Convert.ToInt64 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 64-bit signed integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 64-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int64.MaxValue or less than F:System.Int64.MinValue.

Definition at line 2655 of file Convert.cs.

◆ ToInt64() [15/19]

static long System.Convert.ToInt64 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 64-bit signed integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 64-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.Int64.MaxValue or less than F:System.Int64.MinValue.

Definition at line 2667 of file Convert.cs.

◆ ToInt64() [16/19]

static long System.Convert.ToInt64 ( string  value)
static

Converts the specified string representation of a number to an equivalent 64-bit signed integer.

Parameters
valueA string that contains a number to convert.
Returns
A 64-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue.

Definition at line 2680 of file Convert.cs.

◆ ToInt64() [17/19]

static long System.Convert.ToInt64 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 64-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 64-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue.

Definition at line 2698 of file Convert.cs.

◆ ToInt64() [18/19]

static long System.Convert.ToInt64 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 2711 of file Convert.cs.

◆ ToInt64() [19/19]

static long System.Convert.ToInt64 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 64-bit signed integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 64-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 signed number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 signed number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue.

Definition at line 4305 of file Convert.cs.

◆ ToSByte() [1/19]

static sbyte System.Convert.ToSByte ( object  value)
static

Converts the value of the specified object to an 8-bit signed integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
An 8-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue.

Definition at line 909 of file Convert.cs.

◆ ToSByte() [2/19]

static sbyte System.Convert.ToSByte ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an 8-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
An 8-bit signed integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue.

Definition at line 930 of file Convert.cs.

◆ ToSByte() [3/19]

static sbyte System.Convert.ToSByte ( bool  value)
static

Converts the specified Boolean value to the equivalent 8-bit signed integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 944 of file Convert.cs.

◆ ToSByte() [4/19]

static sbyte System.Convert.ToSByte ( sbyte  value)
static

Returns the specified 8-bit signed integer; no actual conversion is performed.

Parameters
valueThe 8-bit signed integer to return.
Returns
value is returned unchanged.

Definition at line 959 of file Convert.cs.

◆ ToSByte() [5/19]

static sbyte System.Convert.ToSByte ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 8-bit signed integer.

Parameters
valueThe Unicode character to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue.

Definition at line 971 of file Convert.cs.

◆ ToSByte() [6/19]

static sbyte System.Convert.ToSByte ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 8-bit signed integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue.

Definition at line 987 of file Convert.cs.

◆ ToSByte() [7/19]

static sbyte System.Convert.ToSByte ( short  value)
static

Converts the value of the specified 16-bit signed integer to the equivalent 8-bit signed integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1003 of file Convert.cs.

◆ ToSByte() [8/19]

static sbyte System.Convert.ToSByte ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 8-bit signed integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue.

Definition at line 1019 of file Convert.cs.

◆ ToSByte() [9/19]

static sbyte System.Convert.ToSByte ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 8-bit signed integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1035 of file Convert.cs.

◆ ToSByte() [10/19]

static sbyte System.Convert.ToSByte ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 8-bit signed integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1051 of file Convert.cs.

◆ ToSByte() [11/19]

static sbyte System.Convert.ToSByte ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 8-bit signed integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1067 of file Convert.cs.

◆ ToSByte() [12/19]

static sbyte System.Convert.ToSByte ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 8-bit signed integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1083 of file Convert.cs.

◆ ToSByte() [13/19]

static sbyte System.Convert.ToSByte ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 8-bit signed integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 8-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1100 of file Convert.cs.

◆ ToSByte() [14/19]

static sbyte System.Convert.ToSByte ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 8-bit signed integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 8-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1113 of file Convert.cs.

◆ ToSByte() [15/19]

static sbyte System.Convert.ToSByte ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 8-bit signed integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 8-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.SByte.MaxValue or less than F:System.SByte.MinValue.

Definition at line 1126 of file Convert.cs.

◆ ToSByte() [16/19]

static sbyte System.Convert.ToSByte ( string  value)
static

Converts the specified string representation of a number to an equivalent 8-bit signed integer.

Parameters
valueA string that contains the number to convert.
Returns
An 8-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue.

Definition at line 1140 of file Convert.cs.

◆ ToSByte() [17/19]

static sbyte System.Convert.ToSByte ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 8-bit signed integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
An 8-bit signed integer that is equivalent to value .
Exceptions
T:System.ArgumentNullExceptionvalue is null.
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue.

Definition at line 1161 of file Convert.cs.

◆ ToSByte() [18/19]

static sbyte System.Convert.ToSByte ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 1171 of file Convert.cs.

◆ ToSByte() [19/19]

static sbyte System.Convert.ToSByte ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 8-bit signed integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
An 8-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 signed number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 signed number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue.

Definition at line 4160 of file Convert.cs.

◆ ToSingle() [1/18]

static float System.Convert.ToSingle ( object  value)
static

Converts the value of the specified object to a single-precision floating-point number.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A single-precision floating-point number that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 2982 of file Convert.cs.

◆ ToSingle() [2/18]

static float System.Convert.ToSingle ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to an single-precision floating-point number, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A single-precision floating-point number that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement T:System.IConvertible.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 3002 of file Convert.cs.

◆ ToSingle() [3/18]

static float System.Convert.ToSingle ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent single-precision floating-point number.

Parameters
valueThe 8-bit signed integer to convert.
Returns
An 8-bit signed integer that is equivalent to value .

Definition at line 3016 of file Convert.cs.

◆ ToSingle() [4/18]

static float System.Convert.ToSingle ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent single-precision floating-point number.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3025 of file Convert.cs.

◆ ToSingle() [5/18]

static float System.Convert.ToSingle ( char  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe Unicode character to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3034 of file Convert.cs.

◆ ToSingle() [6/18]

static float System.Convert.ToSingle ( short  value)
static

Converts the value of the specified 16-bit signed integer to an equivalent single-precision floating-point number.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3043 of file Convert.cs.

◆ ToSingle() [7/18]

static float System.Convert.ToSingle ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent single-precision floating-point number.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3053 of file Convert.cs.

◆ ToSingle() [8/18]

static float System.Convert.ToSingle ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent single-precision floating-point number.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3062 of file Convert.cs.

◆ ToSingle() [9/18]

static float System.Convert.ToSingle ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent single-precision floating-point number.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3072 of file Convert.cs.

◆ ToSingle() [10/18]

static float System.Convert.ToSingle ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent single-precision floating-point number.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3081 of file Convert.cs.

◆ ToSingle() [11/18]

static float System.Convert.ToSingle ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent single-precision floating-point number.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A single-precision floating-point number that is equivalent to value .

Definition at line 3091 of file Convert.cs.

◆ ToSingle() [12/18]

static float System.Convert.ToSingle ( float  value)
static

Returns the specified single-precision floating-point number; no actual conversion is performed.

Parameters
valueThe single-precision floating-point number to return.
Returns
value is returned unchanged.

Definition at line 3101 of file Convert.cs.

◆ ToSingle() [13/18]

static float System.Convert.ToSingle ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent single-precision floating-point number.

Parameters
valueThe double-precision floating-point number to convert.
Returns
A single-precision floating-point number that is equivalent to value . value is rounded using rounding to nearest. For example, when rounded to two decimals, the value 2.345 becomes 2.34 and the value 2.355 becomes 2.36.

Definition at line 3111 of file Convert.cs.

◆ ToSingle() [14/18]

static float System.Convert.ToSingle ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent single-precision floating-point number.

Parameters
valueThe decimal number to convert.
Returns
A single-precision floating-point number that is equivalent to value . value is rounded using rounding to nearest. For example, when rounded to two decimals, the value 2.345 becomes 2.34 and the value 2.355 becomes 2.36.

Definition at line 3121 of file Convert.cs.

◆ ToSingle() [15/18]

static float System.Convert.ToSingle ( string  value)
static

Converts the specified string representation of a number to an equivalent single-precision floating-point number.

Parameters
valueA string that contains the number to convert.
Returns
A single-precision floating-point number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 3134 of file Convert.cs.

◆ ToSingle() [16/18]

static float System.Convert.ToSingle ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent single-precision floating-point number, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A single-precision floating-point number that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not a number in a valid format.
T:System.OverflowExceptionvalue represents a number that is less than F:System.Single.MinValue or greater than F:System.Single.MaxValue.

Definition at line 3152 of file Convert.cs.

◆ ToSingle() [17/18]

static float System.Convert.ToSingle ( bool  value)
static

Converts the specified Boolean value to the equivalent single-precision floating-point number.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 3165 of file Convert.cs.

◆ ToSingle() [18/18]

static float System.Convert.ToSingle ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 3174 of file Convert.cs.

◆ ToString() [1/36]

static string System.Convert.ToString ( object  value)
static

Converts the value of the specified object to its equivalent string representation.

Parameters
valueAn object that supplies the value to convert, or null.
Returns
The string representation of value , or F:System.String.Empty if value is null.

Definition at line 3793 of file Convert.cs.

◆ ToString() [2/36]

static string System.Convert.ToString ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to its equivalent string representation using the specified culture-specific formatting information.

Parameters
valueAn object that supplies the value to convert, or null.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value , or F:System.String.Empty if value is an object whose value is null. If value is null, the method returns null.

Definition at line 3803 of file Convert.cs.

◆ ToString() [3/36]

static string System.Convert.ToString ( bool  value)
static

Converts the specified Boolean value to its equivalent string representation.

Parameters
valueThe Boolean value to convert.
Returns
The string representation of value .

Definition at line 3826 of file Convert.cs.

◆ ToString() [4/36]

static string System.Convert.ToString ( bool  value,
IFormatProvider  provider 
)
static

Converts the specified Boolean value to its equivalent string representation.

Parameters
valueThe Boolean value to convert.
providerAn instance of an object. This parameter is ignored.
Returns
The string representation of value .

Definition at line 3836 of file Convert.cs.

◆ ToString() [5/36]

static string System.Convert.ToString ( char  value)
static

Converts the value of the specified Unicode character to its equivalent string representation.

Parameters
valueThe Unicode character to convert.
Returns
The string representation of value .

Definition at line 3845 of file Convert.cs.

◆ ToString() [6/36]

static string System.Convert.ToString ( char  value,
IFormatProvider  provider 
)
static

Converts the value of the specified Unicode character to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe Unicode character to convert.
providerAn object that supplies culture-specific formatting information. This parameter is ignored.
Returns
The string representation of value .

Definition at line 3855 of file Convert.cs.

◆ ToString() [7/36]

static string System.Convert.ToString ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to its equivalent string representation.

Parameters
valueThe 8-bit signed integer to convert.
Returns
The string representation of value .

Definition at line 3865 of file Convert.cs.

◆ ToString() [8/36]

static string System.Convert.ToString ( sbyte  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 8-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 8-bit signed integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3876 of file Convert.cs.

◆ ToString() [9/36]

static string System.Convert.ToString ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to its equivalent string representation.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
The string representation of value .

Definition at line 3885 of file Convert.cs.

◆ ToString() [10/36]

static string System.Convert.ToString ( byte  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 8-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 8-bit unsigned integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3895 of file Convert.cs.

◆ ToString() [11/36]

static string System.Convert.ToString ( short  value)
static

Converts the value of the specified 16-bit signed integer to its equivalent string representation.

Parameters
valueThe 16-bit signed integer to convert.
Returns
The string representation of value .

Definition at line 3904 of file Convert.cs.

◆ ToString() [12/36]

static string System.Convert.ToString ( short  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 16-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 16-bit signed integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3914 of file Convert.cs.

◆ ToString() [13/36]

static string System.Convert.ToString ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to its equivalent string representation.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
The string representation of value .

Definition at line 3924 of file Convert.cs.

◆ ToString() [14/36]

static string System.Convert.ToString ( ushort  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 16-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 16-bit unsigned integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3935 of file Convert.cs.

◆ ToString() [15/36]

static string System.Convert.ToString ( int  value)
static

Converts the value of the specified 32-bit signed integer to its equivalent string representation.

Parameters
valueThe 32-bit signed integer to convert.
Returns
The string representation of value .

Definition at line 3944 of file Convert.cs.

◆ ToString() [16/36]

static string System.Convert.ToString ( int  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 32-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 32-bit signed integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3954 of file Convert.cs.

◆ ToString() [17/36]

static string System.Convert.ToString ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to its equivalent string representation.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
The string representation of value .

Definition at line 3964 of file Convert.cs.

◆ ToString() [18/36]

static string System.Convert.ToString ( uint  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 32-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 32-bit unsigned integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3975 of file Convert.cs.

◆ ToString() [19/36]

static string System.Convert.ToString ( long  value)
static

Converts the value of the specified 64-bit signed integer to its equivalent string representation.

Parameters
valueThe 64-bit signed integer to convert.
Returns
The string representation of value .

Definition at line 3984 of file Convert.cs.

◆ ToString() [20/36]

static string System.Convert.ToString ( long  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 64-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 64-bit signed integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 3994 of file Convert.cs.

◆ ToString() [21/36]

static string System.Convert.ToString ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to its equivalent string representation.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
The string representation of value .

Definition at line 4004 of file Convert.cs.

◆ ToString() [22/36]

static string System.Convert.ToString ( ulong  value,
IFormatProvider  provider 
)
static

Converts the value of the specified 64-bit unsigned integer to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe 64-bit unsigned integer to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 4015 of file Convert.cs.

◆ ToString() [23/36]

static string System.Convert.ToString ( float  value)
static

Converts the value of the specified single-precision floating-point number to its equivalent string representation.

Parameters
valueThe single-precision floating-point number to convert.
Returns
The string representation of value .

Definition at line 4024 of file Convert.cs.

◆ ToString() [24/36]

static string System.Convert.ToString ( float  value,
IFormatProvider  provider 
)
static

Converts the value of the specified single-precision floating-point number to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe single-precision floating-point number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 4034 of file Convert.cs.

◆ ToString() [25/36]

static string System.Convert.ToString ( double  value)
static

Converts the value of the specified double-precision floating-point number to its equivalent string representation.

Parameters
valueThe double-precision floating-point number to convert.
Returns
The string representation of value .

Definition at line 4043 of file Convert.cs.

◆ ToString() [26/36]

static string System.Convert.ToString ( double  value,
IFormatProvider  provider 
)
static

Converts the value of the specified double-precision floating-point number to its equivalent string representation.

Parameters
valueThe double-precision floating-point number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 4053 of file Convert.cs.

◆ ToString() [27/36]

static string System.Convert.ToString ( decimal  value)
static

Converts the value of the specified decimal number to its equivalent string representation.

Parameters
valueThe decimal number to convert.
Returns
The string representation of value .

Definition at line 4062 of file Convert.cs.

◆ ToString() [28/36]

static string System.Convert.ToString ( decimal  value,
IFormatProvider  provider 
)
static

Converts the value of the specified decimal number to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe decimal number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 4072 of file Convert.cs.

◆ ToString() [29/36]

static string System.Convert.ToString ( DateTime  value)
static

Converts the value of the specified T:System.DateTime to its equivalent string representation.

Parameters
valueThe date and time value to convert.
Returns
The string representation of value .

Definition at line 4081 of file Convert.cs.

◆ ToString() [30/36]

static string System.Convert.ToString ( DateTime  value,
IFormatProvider  provider 
)
static

Converts the value of the specified T:System.DateTime to its equivalent string representation, using the specified culture-specific formatting information.

Parameters
valueThe date and time value to convert.
providerAn object that supplies culture-specific formatting information.
Returns
The string representation of value .

Definition at line 4091 of file Convert.cs.

◆ ToString() [31/36]

static string System.Convert.ToString ( string  value)
static

Returns the specified string instance; no actual conversion is performed.

Parameters
valueThe string to return.
Returns
value is returned unchanged.

Definition at line 4100 of file Convert.cs.

◆ ToString() [32/36]

static string System.Convert.ToString ( string  value,
IFormatProvider  provider 
)
static

Returns the specified string instance; no actual conversion is performed.

Parameters
valueThe string to return.
providerAn object that supplies culture-specific formatting information. This parameter is ignored.
Returns
value is returned unchanged.

Definition at line 4110 of file Convert.cs.

◆ ToString() [33/36]

static string System.Convert.ToString ( byte  value,
int  toBase 
)
static

Converts the value of an 8-bit unsigned integer to its equivalent string representation in a specified base.

Parameters
valueThe 8-bit unsigned integer to convert.
toBaseThe base of the return value, which must be 2, 8, 10, or 16.
Returns
The string representation of value in base toBase .
Exceptions
T:System.ArgumentExceptiontoBase is not 2, 8, 10, or 16.

Definition at line 4347 of file Convert.cs.

◆ ToString() [34/36]

static string System.Convert.ToString ( short  value,
int  toBase 
)
static

Converts the value of a 16-bit signed integer to its equivalent string representation in a specified base.

Parameters
valueThe 16-bit signed integer to convert.
toBaseThe base of the return value, which must be 2, 8, 10, or 16.
Returns
The string representation of value in base toBase .
Exceptions
T:System.ArgumentExceptiontoBase is not 2, 8, 10, or 16.

Definition at line 4364 of file Convert.cs.

◆ ToString() [35/36]

static string System.Convert.ToString ( int  value,
int  toBase 
)
static

Converts the value of a 32-bit signed integer to its equivalent string representation in a specified base.

Parameters
valueThe 32-bit signed integer to convert.
toBaseThe base of the return value, which must be 2, 8, 10, or 16.
Returns
The string representation of value in base toBase .
Exceptions
T:System.ArgumentExceptiontoBase is not 2, 8, 10, or 16.

Definition at line 4381 of file Convert.cs.

◆ ToString() [36/36]

static string System.Convert.ToString ( long  value,
int  toBase 
)
static

Converts the value of a 64-bit signed integer to its equivalent string representation in a specified base.

Parameters
valueThe 64-bit signed integer to convert.
toBaseThe base of the return value, which must be 2, 8, 10, or 16.
Returns
The string representation of value in base toBase .
Exceptions
T:System.ArgumentExceptiontoBase is not 2, 8, 10, or 16.

Definition at line 4398 of file Convert.cs.

◆ ToUInt16() [1/19]

static ushort System.Convert.ToUInt16 ( object  value)
static

Converts the value of the specified object to a 16-bit unsigned integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 16-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue.

Definition at line 1707 of file Convert.cs.

◆ ToUInt16() [2/19]

static ushort System.Convert.ToUInt16 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 16-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 16-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue.

Definition at line 1728 of file Convert.cs.

◆ ToUInt16() [3/19]

static ushort System.Convert.ToUInt16 ( bool  value)
static

Converts the specified Boolean value to the equivalent 16-bit unsigned integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 1742 of file Convert.cs.

◆ ToUInt16() [4/19]

static ushort System.Convert.ToUInt16 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 16-bit unsigned integer.

Parameters
valueThe Unicode character to convert.
Returns
The 16-bit unsigned integer equivalent to value .

Definition at line 1756 of file Convert.cs.

◆ ToUInt16() [5/19]

static ushort System.Convert.ToUInt16 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 16-bit unsigned integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 1768 of file Convert.cs.

◆ ToUInt16() [6/19]

static ushort System.Convert.ToUInt16 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 16-bit unsigned integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .

Definition at line 1782 of file Convert.cs.

◆ ToUInt16() [7/19]

static ushort System.Convert.ToUInt16 ( short  value)
static

Converts the value of the specified 16-bit signed integer to the equivalent 16-bit unsigned integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 1794 of file Convert.cs.

◆ ToUInt16() [8/19]

static ushort System.Convert.ToUInt16 ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 16-bit unsigned integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt16.MaxValue.

Definition at line 1810 of file Convert.cs.

◆ ToUInt16() [9/19]

static ushort System.Convert.ToUInt16 ( ushort  value)
static

Returns the specified 16-bit unsigned integer; no actual conversion is performed.

Parameters
valueThe 16-bit unsigned integer to return.
Returns
value is returned unchanged.

Definition at line 1825 of file Convert.cs.

◆ ToUInt16() [10/19]

static ushort System.Convert.ToUInt16 ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 16-bit unsigned integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.UInt16.MaxValue.

Definition at line 1837 of file Convert.cs.

◆ ToUInt16() [11/19]

static ushort System.Convert.ToUInt16 ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 16-bit unsigned integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt16.MaxValue.

Definition at line 1853 of file Convert.cs.

◆ ToUInt16() [12/19]

static ushort System.Convert.ToUInt16 ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 16-bit unsigned integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A 16-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.UInt16.MaxValue.

Definition at line 1869 of file Convert.cs.

◆ ToUInt16() [13/19]

static ushort System.Convert.ToUInt16 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 16-bit unsigned integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 16-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt16.MaxValue.

Definition at line 1886 of file Convert.cs.

◆ ToUInt16() [14/19]

static ushort System.Convert.ToUInt16 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 16-bit unsigned integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 16-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt16.MaxValue.

Definition at line 1899 of file Convert.cs.

◆ ToUInt16() [15/19]

static ushort System.Convert.ToUInt16 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 16-bit unsigned integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 16-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt16.MaxValue.

Definition at line 1912 of file Convert.cs.

◆ ToUInt16() [16/19]

static ushort System.Convert.ToUInt16 ( string  value)
static

Converts the specified string representation of a number to an equivalent 16-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
Returns
A 16-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue.

Definition at line 1926 of file Convert.cs.

◆ ToUInt16() [17/19]

static ushort System.Convert.ToUInt16 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 16-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 16-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue.

Definition at line 1945 of file Convert.cs.

◆ ToUInt16() [18/19]

static ushort System.Convert.ToUInt16 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 1959 of file Convert.cs.

◆ ToUInt16() [19/19]

static ushort System.Convert.ToUInt16 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 16-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 16-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 unsigned number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 unsigned number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue.

Definition at line 4227 of file Convert.cs.

◆ ToUInt32() [1/19]

static uint System.Convert.ToUInt32 ( object  value)
static

Converts the value of the specified object to a 32-bit unsigned integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 32-bit unsigned integer that is equivalent to value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue.

Definition at line 2235 of file Convert.cs.

◆ ToUInt32() [2/19]

static uint System.Convert.ToUInt32 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 32-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 32-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue.

Definition at line 2256 of file Convert.cs.

◆ ToUInt32() [3/19]

static uint System.Convert.ToUInt32 ( bool  value)
static

Converts the specified Boolean value to the equivalent 32-bit unsigned integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 2270 of file Convert.cs.

◆ ToUInt32() [4/19]

static uint System.Convert.ToUInt32 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 32-bit unsigned integer.

Parameters
valueThe Unicode character to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .

Definition at line 2284 of file Convert.cs.

◆ ToUInt32() [5/19]

static uint System.Convert.ToUInt32 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 32-bit unsigned integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2296 of file Convert.cs.

◆ ToUInt32() [6/19]

static uint System.Convert.ToUInt32 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 32-bit unsigned integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .

Definition at line 2310 of file Convert.cs.

◆ ToUInt32() [7/19]

static uint System.Convert.ToUInt32 ( short  value)
static

Converts the value of the specified 16-bit signed integer to the equivalent 32-bit unsigned integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2322 of file Convert.cs.

◆ ToUInt32() [8/19]

static uint System.Convert.ToUInt32 ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 32-bit unsigned integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .

Definition at line 2336 of file Convert.cs.

◆ ToUInt32() [9/19]

static uint System.Convert.ToUInt32 ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 32-bit unsigned integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2348 of file Convert.cs.

◆ ToUInt32() [10/19]

static uint System.Convert.ToUInt32 ( uint  value)
static

Returns the specified 32-bit unsigned integer; no actual conversion is performed.

Parameters
valueThe 32-bit unsigned integer to return.
Returns
value is returned unchanged.

Definition at line 2363 of file Convert.cs.

◆ ToUInt32() [11/19]

static uint System.Convert.ToUInt32 ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 32-bit unsigned integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt32.MaxValue.

Definition at line 2375 of file Convert.cs.

◆ ToUInt32() [12/19]

static uint System.Convert.ToUInt32 ( ulong  value)
static

Converts the value of the specified 64-bit unsigned integer to an equivalent 32-bit unsigned integer.

Parameters
valueThe 64-bit unsigned integer to convert.
Returns
A 32-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is greater than F:System.UInt32.MaxValue.

Definition at line 2391 of file Convert.cs.

◆ ToUInt32() [13/19]

static uint System.Convert.ToUInt32 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 32-bit unsigned integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 32-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt32.MaxValue.

Definition at line 2408 of file Convert.cs.

◆ ToUInt32() [14/19]

static uint System.Convert.ToUInt32 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 32-bit unsigned integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 32-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt32.MaxValue.

Definition at line 2421 of file Convert.cs.

◆ ToUInt32() [15/19]

static uint System.Convert.ToUInt32 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 32-bit unsigned integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 32-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt32.MaxValue.

Definition at line 2444 of file Convert.cs.

◆ ToUInt32() [16/19]

static uint System.Convert.ToUInt32 ( string  value)
static

Converts the specified string representation of a number to an equivalent 32-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
Returns
A 32-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue.

Definition at line 2458 of file Convert.cs.

◆ ToUInt32() [17/19]

static uint System.Convert.ToUInt32 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 32-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 32-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue.

Definition at line 2477 of file Convert.cs.

◆ ToUInt32() [18/19]

static uint System.Convert.ToUInt32 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 2491 of file Convert.cs.

◆ ToUInt32() [19/19]

static uint System.Convert.ToUInt32 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 32-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 32-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 unsigned number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 unsigned number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue.

Definition at line 4281 of file Convert.cs.

◆ ToUInt64() [1/19]

static ulong System.Convert.ToUInt64 ( object  value)
static

Converts the value of the specified object to a 64-bit unsigned integer.

Parameters
valueAn object that implements the T:System.IConvertible interface, or null.
Returns
A 64-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue.

Definition at line 2727 of file Convert.cs.

◆ ToUInt64() [2/19]

static ulong System.Convert.ToUInt64 ( object  value,
IFormatProvider  provider 
)
static

Converts the value of the specified object to a 64-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueAn object that implements the T:System.IConvertible interface.
providerAn object that supplies culture-specific formatting information.
Returns
A 64-bit unsigned integer that is equivalent to value , or zero if value is null.
Exceptions
T:System.FormatExceptionvalue is not in an appropriate format.
T:System.InvalidCastExceptionvalue does not implement the T:System.IConvertible interface. -or-The conversion is not supported.
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue.

Definition at line 2748 of file Convert.cs.

◆ ToUInt64() [3/19]

static ulong System.Convert.ToUInt64 ( bool  value)
static

Converts the specified Boolean value to the equivalent 64-bit unsigned integer.

Parameters
valueThe Boolean value to convert.
Returns
The number 1 if value is true; otherwise, 0.

Definition at line 2762 of file Convert.cs.

◆ ToUInt64() [4/19]

static ulong System.Convert.ToUInt64 ( char  value)
static

Converts the value of the specified Unicode character to the equivalent 64-bit unsigned integer.

Parameters
valueThe Unicode character to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .

Definition at line 2776 of file Convert.cs.

◆ ToUInt64() [5/19]

static ulong System.Convert.ToUInt64 ( sbyte  value)
static

Converts the value of the specified 8-bit signed integer to the equivalent 64-bit unsigned integer.

Parameters
valueThe 8-bit signed integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2788 of file Convert.cs.

◆ ToUInt64() [6/19]

static ulong System.Convert.ToUInt64 ( byte  value)
static

Converts the value of the specified 8-bit unsigned integer to the equivalent 64-bit unsigned integer.

Parameters
valueThe 8-bit unsigned integer to convert.
Returns
A 64-bit signed integer that is equivalent to value .

Definition at line 2802 of file Convert.cs.

◆ ToUInt64() [7/19]

static ulong System.Convert.ToUInt64 ( short  value)
static

Converts the value of the specified 16-bit signed integer to the equivalent 64-bit unsigned integer.

Parameters
valueThe 16-bit signed integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2814 of file Convert.cs.

◆ ToUInt64() [8/19]

static ulong System.Convert.ToUInt64 ( ushort  value)
static

Converts the value of the specified 16-bit unsigned integer to the equivalent 64-bit unsigned integer.

Parameters
valueThe 16-bit unsigned integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .

Definition at line 2828 of file Convert.cs.

◆ ToUInt64() [9/19]

static ulong System.Convert.ToUInt64 ( int  value)
static

Converts the value of the specified 32-bit signed integer to an equivalent 64-bit unsigned integer.

Parameters
valueThe 32-bit signed integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2840 of file Convert.cs.

◆ ToUInt64() [10/19]

static ulong System.Convert.ToUInt64 ( uint  value)
static

Converts the value of the specified 32-bit unsigned integer to an equivalent 64-bit unsigned integer.

Parameters
valueThe 32-bit unsigned integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .

Definition at line 2854 of file Convert.cs.

◆ ToUInt64() [11/19]

static ulong System.Convert.ToUInt64 ( long  value)
static

Converts the value of the specified 64-bit signed integer to an equivalent 64-bit unsigned integer.

Parameters
valueThe 64-bit signed integer to convert.
Returns
A 64-bit unsigned integer that is equivalent to value .
Exceptions
T:System.OverflowExceptionvalue is less than zero.

Definition at line 2866 of file Convert.cs.

◆ ToUInt64() [12/19]

static ulong System.Convert.ToUInt64 ( ulong  value)
static

Returns the specified 64-bit unsigned integer; no actual conversion is performed.

Parameters
valueThe 64-bit unsigned integer to return.
Returns
value is returned unchanged.

Definition at line 2881 of file Convert.cs.

◆ ToUInt64() [13/19]

static ulong System.Convert.ToUInt64 ( float  value)
static

Converts the value of the specified single-precision floating-point number to an equivalent 64-bit unsigned integer.

Parameters
valueThe single-precision floating-point number to convert.
Returns
value , rounded to the nearest 64-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt64.MaxValue.

Definition at line 2894 of file Convert.cs.

◆ ToUInt64() [14/19]

static ulong System.Convert.ToUInt64 ( double  value)
static

Converts the value of the specified double-precision floating-point number to an equivalent 64-bit unsigned integer.

Parameters
valueThe double-precision floating-point number to convert.
Returns
value , rounded to the nearest 64-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt64.MaxValue.

Definition at line 2907 of file Convert.cs.

◆ ToUInt64() [15/19]

static ulong System.Convert.ToUInt64 ( decimal  value)
static

Converts the value of the specified decimal number to an equivalent 64-bit unsigned integer.

Parameters
valueThe decimal number to convert.
Returns
value , rounded to the nearest 64-bit unsigned integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.
Exceptions
T:System.OverflowExceptionvalue is less than zero or greater than F:System.UInt64.MaxValue.

Definition at line 2920 of file Convert.cs.

◆ ToUInt64() [16/19]

static ulong System.Convert.ToUInt64 ( string  value)
static

Converts the specified string representation of a number to an equivalent 64-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
Returns
A 64-bit signed integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue.

Definition at line 2934 of file Convert.cs.

◆ ToUInt64() [17/19]

static ulong System.Convert.ToUInt64 ( string  value,
IFormatProvider  provider 
)
static

Converts the specified string representation of a number to an equivalent 64-bit unsigned integer, using the specified culture-specific formatting information.

Parameters
valueA string that contains the number to convert.
providerAn object that supplies culture-specific formatting information.
Returns
A 64-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.FormatExceptionvalue does not consist of an optional sign followed by a sequence of digits (0 through 9).
T:System.OverflowExceptionvalue represents a number that is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue.

Definition at line 2953 of file Convert.cs.

◆ ToUInt64() [18/19]

static ulong System.Convert.ToUInt64 ( DateTime  value)
static

Calling this method always throws T:System.InvalidCastException.

Parameters
valueThe date and time value to convert.
Returns
This conversion is not supported. No value is returned.
Exceptions
T:System.InvalidCastExceptionThis conversion is not supported.

Definition at line 2967 of file Convert.cs.

◆ ToUInt64() [19/19]

static ulong System.Convert.ToUInt64 ( string  value,
int  fromBase 
)
static

Converts the string representation of a number in a specified base to an equivalent 64-bit unsigned integer.

Parameters
valueA string that contains the number to convert.
fromBaseThe base of the number in value , which must be 2, 8, 10, or 16.
Returns
A 64-bit unsigned integer that is equivalent to the number in value , or 0 (zero) if value is null.
Exceptions
T:System.ArgumentExceptionfromBase is not 2, 8, 10, or 16. -or- value , which represents a non-base 10 unsigned number, is prefixed with a negative sign.
T:System.ArgumentOutOfRangeExceptionvalue is F:System.String.Empty.
T:System.FormatExceptionvalue contains a character that is not a valid digit in the base specified by fromBase . The exception message indicates that there are no digits to convert if the first character in value is invalid; otherwise, the message indicates that value contains invalid trailing characters.
T:System.OverflowExceptionvalue , which represents a non-base 10 unsigned number, is prefixed with a negative sign.-or- value represents a number that is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue.

Definition at line 4330 of file Convert.cs.

Member Data Documentation

◆ DBNull

readonly object System.Convert.DBNull = System.DBNull.Value
static

A constant that represents a database column that is absent of data; that is, database null.

Definition at line 109 of file Convert.cs.


The documentation for this class was generated from the following file: