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!

Byte.Parse (String)

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;

Parameters

s
The string to convert to a Byte.

Return Value

The Byte value of the string.

Exceptions

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.

Remarks

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.

See Also

Byte Structure | Byte Members | System Namespace | Byte.Parse Overload List