Cast
Cast(object, Type, ExceptionMode)
Description
Cast the object.
Parameters
Parameter Name | Description |
---|---|
obj | The object to cast |
type | Casting type |
exceptionMode | Exception mode If other than Throw, return default when an exception occurs. |
Returns
Casted value
Cast(object, Type, bool)
public static object Cast(object obj, Type type, bool ignoreThrowException) ;
Description
Cast the object.
Parameters
Parameter Name | Description |
---|---|
obj | The object to cast |
type | Casting type |
ignoreThrowException | Flag to ignore exceptions. If set to true, it will output an exception message to the log and return default when an exception occurs. |
Returns
Casted value