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.
A UInt32 parsed from s.
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. |
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.