Parses an Int16 from a String.
[Visual Basic] Public Shared Function FromString( _ ByVal s As String _ ) As Short [C#] public static short FromString( string s ); [C++] public: static short FromString( String* s ); [JScript] public static function FromString( s : String ) : Int16;
The Int16 value of the string.
Exception Type | Condition |
---|---|
ArgumentException | If s is a null reference (in Visual Basic Nothing). |
FormatException | If s does not contain a well-formed number. |
OverflowException | If s is greater than positive 32767 or less than negative 32768. |
FromString parses an unsigned short from a string.
The default (culture-neutral) is NumberFormatInfo is used (see NumberFormatInfo and CultureInfo for more information for numeric and culture formats).
Use Parse and Format for locale dependent strings.
The output from ToString should be consumable by FromString().
Int16 Structure | Int16 Members | System Namespace | String | NumberStyles