Converts a String to a Byte with a default format.
[Visual Basic] Overloads Public Shared Function Parse( _ ByVal s As String _ ) As Byte [C#] public static byte Parse( string s ); [C++] public: static unsigned char Parse( String* s ); [JScript] public static function Parse( s : String ) : Byte;
The Byte value of the string.
Exception Type | Condition |
---|---|
ArgumentNullException | If the string is null. |
FormatException | If the string is contains a character other than 0 through 9. |
FormatException | If the string represents a number that is less than MinValue or greater than MaxValue. |
The Parse method converts (parses) a string to a Byte.
In order for Parse to convert a String to a Byte, the string must consist of a sequence of digits ("0"- "9"). The leading and trailing white space characters are ignored.
Byte Structure | Byte Members | System Namespace | Byte.Parse Overload List