UInt64Converter Class

Definition

Provides a type converter to convert 64-bit unsigned integer objects to and from other representations.

public class UInt64Converter : System.ComponentModel.BaseNumberConverter
Inheritance

Inherited Members

System.ComponentModel.BaseNumberConverter

System.ComponentModel.TypeConverter

System.Object

Examples

The following code example converts a variable of type UInt64 to a string, and vice versa.

UInt64 myUInt64(123456789123);
String^ myUInt64String = "184467440737095551";
Console::WriteLine( TypeDescriptor::GetConverter( myUInt64 )->ConvertTo( myUInt64, String::typeid ) );
Console::WriteLine( TypeDescriptor::GetConverter( myUInt64 )->ConvertFrom( myUInt64String ) );
ulong myUInt64 = 123456789123;
string myUInt64String = "184467440737095551";
Console.WriteLine(TypeDescriptor.GetConverter(myUInt64).ConvertTo(myUInt64, typeof(string))); 
Console.WriteLine(TypeDescriptor.GetConverter(myUInt64).ConvertFrom(myUInt64String));    
'This data type is not supported in Visual Basic.

Remarks

This converter can only convert a 64-bit unsigned integer object to and from a string.

The UInt64 value type represents unsigned integers with values ranging from 0 to 184,467,440,737,095,551,615. This data type is not supported in Visual Basic.

Note

You should never create an instance of a UInt64Converter. Instead, call the GetConverter method of TypeDescriptor. For more information, see the examples in the TypeConverter base class and How to: Implement a Type Converter.

Constructors

UInt64Converter()

Initializes a new instance of the UInt64Converter class.