in src/main/csharp/Selector/AlignedNumericValues.cs [153:172]
private object ConvertValue(object value, T targetTypeEnum)
{
switch(targetTypeEnum)
{
case T.SByteType : return Convert.ToSByte (value);
case T.ByteType : return Convert.ToByte (value);
case T.CharType : return Convert.ToChar (value);
case T.ShortType : return Convert.ToInt16 (value);
case T.UShortType: return Convert.ToUInt16(value);
case T.IntType : return Convert.ToInt32 (value);
case T.UIntType : return Convert.ToUInt32(value);
case T.LongType : return Convert.ToInt64 (value);
case T.ULongType : return Convert.ToUInt64(value);
case T.FloatType : return Convert.ToSingle(value);
case T.DoubleType: return Convert.ToDouble(value);
default:
throw new NotSupportedException(
string.Format("Unsupported data type {0}.", targetTypeEnum));
}
}