Example:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
DataTable dt = new DataTable("mydatatable");
DataColumn dc = new DataColumn("TextColumn", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("IntegerColumn", Type.GetType("System.Int32"));
dt.Columns.Add(dc);
dc = new DataColumn("DecimalColumn", Type.GetType("System.Decimal"));
dt.Columns.Add(dc);
foreach (DataColumn c in dt.Columns)
{
Console.WriteLine(c.ColumnName.ToString());
}
Console.ReadKey();
}
}
}