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!

Int16.FromString

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;

Parameters

s
The string containing a number to convert.

Return Value

The Int16 value of the string.

Exceptions

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.

Remarks

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().

See Also

Int16 Structure | Int16 Members | System Namespace | String | NumberStyles