I have a DataTable of 4 columns A,B,C,D with 4 rows of data all containing integer values.I want to return a DataRow of A,B,C,D columns which contains the sum of individual A,B,C,D column's values. There is no filter, straight up total as do in an excel.
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[4] {
new DataColumn("A", typeof(int)),
new DataColumn("B", typeof(int)),
new DataColumn("C", typeof(int)),
new DataColumn("D", typeof(int))
});
dt.Rows.Add(1,1,1,1);
dt.Rows.Add(2,2,2,2);
dt.Rows.Add(3,3,3,3);
dt.Rows.Add(4,4,4,4);
The output data row must contain 4 columns of 10,10,10,10 values

