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.FromString

Parses an UInt32 from a String. The UInt32 type is not CLS compliant. The CLS-compliant alternative is Int32.

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

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

Parameters [C#, C++, JScript]

s
A string containing a number.

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

A UInt32 parsed from s.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentNullException If the string is a null reference (in Visual Basic Nothing).
FormatException If the string doesn't contain a real number.
OverflowException If the number is greater than positive 32767 or less than negative 32768.

Remarks [C#, C++, JScript]

The UInt32 method returns an unsigned int from parsing a string. The default (locale-neutral) NumberFormatInfo is used (see NumberFormatInfo or CultureInfo for more information on numeric and culture formats).

The output from ToString should be consumable by FromString.

Use Parse and Format for culture dependent strings.

See Also

UInt32 Structure | UInt32 Members | System Namespace