C-DEngine 5.105

TheCommonUtils..::..CByte Method

Converts an object to a byte.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static byte CByte(
	Object inObj
)
Public Shared Function CByte ( _
	inObj As Object _
) As Byte
public:
static unsigned char^ CByte(
	Object^ inObj
)

Parameters

inObj
Type: Object
Input to be converted.

Return Value

The converted value.

Remarks


A safe, efficient function to convert any input to an unsigned byte value. Safe means that no unhandled exceptions are generated. A null input returns a value of zero. An empty string also returns zero. To handle values over 256, modulo of 256 is returned.