I have a datatable in Winforms.
I am currently trying to find the max and min values for each of the columns for each row. My table layout is like this
A | B | C | D | E | ---+---+----+---+---+ 5 | 2 | 3 | 4 | 3
The end goal is to have a function that would caculate
Max(A,B,C,D) - Min(A,B,C,D)
dt.Columns.Add("Function Column", typeof(Double), "A + B + C + D");
This returns that Max value for the entire table
dt.Columns.Add("Function Column", typeof(Double), "Max(A)");
How do I get the max and min values of each row so I can do my caculation ?