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!

SByte.FromString

Converts a String to an SByte. The SByte type is not CLS compliant. The CLS-compliant alternative is Byte.

[C#]
public static sbyte FromString(
   string s
);
[C++]
public: static char FromString(
   String* s
);
[JScript]
public static function FromString(
   s : String
) : SByte;

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

Parameters [C#, C++, JScript]

s
The string containing a number to convert.

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

Returns the SByte value of the string.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentException If s is a null reference (in Visual Basic Nothing).
FormatException If s does not contain a real number.
OverflowException If s is greater than 127 or less than-128.

Remarks [C#, C++, JScript]

The default (locale-neutral) NumberFormatInfo is used. Use Parse and Format for locale-dependent strings.

The output from ToString should be consumable by FromString.

See Also

SByte Structure | SByte Members | System Namespace | CultureInfo