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