-1-
-2-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace ConsoleApplication20
{
class Program
{
static void Main(string[] args)
{
DataColumn colEmpNO = new DataColumn();
colEmpNO.ColumnName = "empno";
colEmpNO.DataType = typeof(int);
//=============================================
DataColumn colEmpName = new DataColumn();
colEmpName.ColumnName = "empname";
//===========================================
Console.WriteLine(colEmpNO.ColumnName);
Console.WriteLine(colEmpNO.DataType);
Console.WriteLine(colEmpName.ColumnName);
Console.WriteLine(colEmpName.DataType);
//===========================================================
// empno
// System.Int 32
// empname
// System. String
// Press any key to continue
DataColumn colEmpNo = new DataColumn("empno");
Console.WriteLine(colEmpNo.ColumnName);
//empno
DataColumn colEmpNo1 = new DataColumn("empno1", typeof(int));
Console.WriteLine(colEmpNo1.ColumnName);
Console.WriteLine(colEmpNo1.DataType);
//empno
//System.Int32
//empname
//System.String
//empno
//empno1
//System.Int32
//Press any key to continue . . .
}
}
}
-3-
-4-