DataTable Dtable=new DataTable();
DataColumn DColumn=new DataColumn("Salary",typeof(float));
DTable.Column.Add(DColumn);
DataRow DRow=DTable.NewRow();
DRow[0]=25000;
DTable.Rows.Add(DRow);
DRow=DTable.NewRow();
DRow[0]=30000;
DTable.Rows.Add(DRow);
float TotalSalary=(float)DTable.Compute("Sum(Salary)","");
Console.WriteLine(TotalSalary);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment