C-DEngine 5.105

TheCommonUtils..::..CSByte Method

Converts an object to an 8-bit signed integer.

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

Syntax


public static sbyte CSByte(
	Object inObj
)
Public Shared Function CSByte ( _
	inObj As Object _
) As SByte
public:
static signed char^ CSByte(
	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 8-bit signed integer. Safe means that no unhandled exceptions are generated. A null input value returns 0. Any invalid input value returns 0. If the input object is of type bool, 'true' returns 1 and 'false' returns 0. Input strings that start with "0x" are interpreted as hexidecimal values.