public static Type GetDataType(char DbaseType)
{
Type type;
switch (DbaseType)
{
case 'L': // logical data type, one character (T,t,F,f,Y,y,N,n)
type = typeof(bool);
break;
case 'C': // char or string
type = typeof(string);
break;
case 'D': // date
type = typeof(DateTime);
break;
case 'N': // numeric
type = typeof(double);
break;
case 'F': // double
type = typeof(float);
break;
case 'B': // BLOB - not a dbase but this will hold the WKB for a geometry object.
type = typeof(byte[]);
break;
default:
throw new NotSupportedException("Do not know how to parse Field type " + DbaseType);
}
return type;
}
}