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!

UInt32.Parse (String)

Converts a String to a UInt32. The UInt32 type is not CLS compliant. The CLS-compliant alternative is Int32.

[C#]
public static uint Parse(
   string s
);
[C++]
public: static unsigned int Parse(
   String* s
);
[JScript]
public static function Parse(
   s : String
) : UInt32;

[Visual Basic] The UInt32 type cannot be used in Visual Basic.

Parameters [C#, C++, JScript]

s
The string to be converted to a UInt32.

Return Value [C#, C++, JScript]

The UInt32 value of the string.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentNullException If the string is a null reference (in Visual Basic Nothing).
FormatException If the string contains a character other than the minus sign ("-") or the digits 0 through 9.
OverflowException If the string represents a number that is less than MinValue or greater than MaxValue.

Remarks [C#, C++, JScript]

The numeric format information is obtained from the current locale (see NumberFormatInfo and CultureInfo for more information for numeric and culture formats). The string s should be the return value of one of the format methods.

The string must consist of an optional minus sign ("-") followed by a sequence of digits ("0" through "9").

Leading and trailing white space characters are ignored.

Note   Hexadecimal strings ("0x42") are not supported. Use the Value or Convert ToIntxx(string, int) and ToUIntxx methods for the conversions.
Note   The Parse methods do not accept not a number (NaN) or positive or negative infinity.

See Also

UInt32 Structure | UInt32 Members | System Namespace | UInt32.Parse Overload List | String | Value | Convert | MaxValue | MinValue | NaN | NaN | PositiveInfinity | PositiveInfinity | NegativeInfinity | NegativeInfinity