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!

Decimal.ToByte (Decimal)

Converts a Decimal to an unsigned Byte.

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

Parameters

value
The Decimal value to convert.

Return Value

The result of converting the argument to an unsigned byte.

Exceptions

Exception Type Condition
OverflowException is thrown if the resulting integer value is less than Byte.MinValue or greater than Byte.MaxValue.

Remarks

The Decimal value is rounded toward zero to the nearest integer value, and the result of this operation is returned as a byte.

See Also

Decimal Structure | Decimal Members | System Namespace | Decimal.ToByte Overload List