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, NumberStyles, NumberFormatInfo)

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

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

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

Parameters [C#, C++, JScript]

s
The string to be interpreted.
style
The permitted style of the numeric string.
info
The NumberFormatInfo instance used to format the string.

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

A UInt32 with the value represented by s.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentException If style is not a NumberStyles enumeration.
ArgumentNullException If the string is a null reference (in Visual Basic Nothing).
FormatException If the string is not in the correct format.
OverflowException If the string represents a number that is less than MinValue or greater than MaxValue.

Remarks [C#, C++, JScript]

The Parse method converts a string to a numeric value.

If s has been created by one of the Format methods using C, D, E, F, G, or N as the format specifier, it is guaranteed that s can be parsed when style is NumberStyles enumeration.

The style parameter must be a combination of bit flags from the NumberStyles enumeration.

If the info parameter is null, the numeric format information is obtained from the current locale (see NumberFormatInfo and CultureInfo for more information on numeric and culture formats).

Note   Hexadecimal strings ("0x42") are not supported. Use 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