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);
//For Doolar Formate
string u= string.Format("{0:C}", ds.Tables[0].Compute("sum(Salary)", ""));
string u = string.Format("{0:0,000,000}", ds.Tables[0].Compute("sum(Salary)", ""));
//for Indian Rupee formate
string u = string.Format("{0:#,#.}", ds.Tables[0].Compute("sum(Salary)", ""));
Console.WriteLine(TotalSalary);
Friday, January 14, 2011
Subscribe to:
Posts (Atom)