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