Arbor 3: FSM & BT Graph Editor  3.7.8
DynamicUtility Class Reference

Dynamic type utility class More...

Static Public Member Functions

static object Cast (object obj, System.Type type, bool ignoreThrowException=true)
 Cast the object. More...
 
static object GetDefault (System.Type type)
 Returns the default value of type. More...
 
static object Rebox (object obj)
 Rebox object and copy the value. More...
 

Detailed Description

Dynamic type utility class

Member Function Documentation

◆ Cast()

static object Cast ( object  obj,
System.Type  type,
bool  ignoreThrowException = true 
)
static

Cast the object.

Parameters
objThe object to cast
typeCasting type
ignoreThrowExceptionFlag to ignore exceptions
Returns
Casted value

◆ GetDefault()

static object GetDefault ( System.Type  type)
static

Returns the default value of type.

Parameters
typeDefault value type
Returns
Default value

◆ Rebox()

static object Rebox ( object  obj)
static

Rebox object and copy the value.

Parameters
objobject
Returns
Reboxed object

If it is not a value type, it is not copied.