NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Convert.ToUInt64 (String, Int32)

Parses a specified value in a specified base.

[Visual Basic]
Overloads Public Shared Function ToUInt64( _
   ByVal value As String, _
   ByVal fromBase As Integer _
) As UInt64
[C#]
public static ulong ToUInt64(
   string value,
   int fromBase
);
[C++]
public: static unsigned __int64 ToUInt64(
   String* value,
   int fromBase
);
[JScript]
public static function ToUInt64(
   value : String,
   fromBase : int
) : UInt64;

Parameters

value
The String to be parsed.
fromBase
The base in which to parse value.

Return Value

The converted value.

Exceptions

Exception Type Condition
ArgumentException fromBase is not 2, 8, 10, or 16.
FormatException value cannot be parsed as a base fromBase number.
ArgumentNullException value is null.
OverflowException The value represented by value is greater than UInt64.MaxValue or less than UInt64.MinValue.

Remarks

A fromBase value can be only 2, 8, 10, or 16. If fromBase is 16, the number may be preceded by "0x"; any other leading or trailing characters will cause an error.

See Also

Convert Class | Convert Members | System Namespace | Convert.ToUInt64 Overload List