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.
Returns the SByte 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 real number. |
OverflowException | If s is greater than 127 or less than-128. |
The default (locale-neutral) NumberFormatInfo is used. Use Parse and Format for locale-dependent strings.
The output from ToString should be consumable by FromString.
SByte Structure | SByte Members | System Namespace | CultureInfo