public static void AddColumn(DbaseFileHeader header, string columnName, Type t)
{
columnName = Utilities.EnsureMaxLength(columnName, 10);
if (t == typeof(bool))
{
header.AddColumn(columnName, 'L', 1, 0);
}
else if (t == typeof(string))
{
header.AddColumn(columnName, 'C', 254, 0);
}
else if (t == typeof(DateTime))
{
header.AddColumn(columnName, 'C', 22, 0);
}
else if (t == typeof(float) || t == typeof(double) || t == typeof(decimal))
{
header.AddColumn(columnName, 'N', 18, 10);
}
else if (t == typeof(short) || t == typeof(int) || t == typeof(long)
|| t == typeof(ushort) || t == typeof(uint) || t == typeof(ulong))
{
header.AddColumn(columnName, 'N', 18, 0);
}
}