getAsType<T> method
Converts object value into a value defined by specied typecode. If conversion is not possible it returns default value for the specified type.
typeCode
the TypeCode that defined the type of the result Returns value defined by the typecode or type default value if conversion is not supported.
Implementation
T getAsType<T>(TypeCode typeCode) {
var defaultValue = T as T;
return getAsTypeWithDefault<T>(typeCode, defaultValue);
}