Converts a String to a formatted SByte. The SByte type is not CLS compliant. The CLS-compliant alternative is Byte.
[C#] public static sbyte Parse( string s ); [C++] public: static char Parse( String* s ); [JScript] public static function Parse( s : String ) : SByte;
[Visual Basic] The SByte type cannot be used in Visual Basic.
Returns the byte representation of s.
Exception Type | Condition |
---|---|
ArgumentException | If s is a null reference (in Visual Basic Nothing). |
FormatException | If s does not consist of an optional minus sign followed by a sequence of digits ("0"- "9"). |
OverflowException | If s represents a number that is less than SByte.MinValue or greater than SByte.MaxValue. |
Leading and trailing white space characters are ignored.
SByte Structure | SByte Members | System Namespace | SByte.Parse Overload List | String | MaxValue | MinValue