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!

Convert.ToByte (String)

Converts a String to an 8-bit unsigned byte.

[Visual Basic]
Overloads Public Shared Function ToByte( _
   ByVal value As String _
) As Byte
[C#]
public static byte ToByte(
   string value
);
[C++]
public: static unsigned char ToByte(
   String* value
);
[JScript]
public static function ToByte(
   value : String
) : Byte;

Parameters

value
The number to be converted.

Return Value

The converted value.

Exceptions

Exception Type Condition
ArgumentNullException If value is null.
FormatException If the value is not a string representation that can be converted to a Byte using the Parse(String) method implemented by that type.
OverflowException If the value represented by value is greater than Byte.MaxValue or less than Byte.MinValue. Note that if the beginning of the string value contains a properly formatted numerical value that will result in an overflow and, in addition, the end of the string is improperly formed, it cannot be determined whether an OverflowException or a FormatException will be thrown. This has been implemented this way for performance reasons. The implementation is provided by Byte.Parse(String).

Remarks

[To be supplied.]

See Also

Convert Class | Convert Members | System Namespace | Convert.ToByte Overload List