-1
I have 3 lines in a datatable:
DataTable dt = new DataTable();
dt.Clear();
dt.Columns.Add("PESO");
dt.Columns.Add("ALTURA");
DataRow row1 = dt.NewRow();
row1["PESO"] = "MAGRO";
row1["ALTURA"] = "BAIXO";
dt.Rows.Add(row1);
DataRow row2 = dt.NewRow();
row2["PESO"] = "MAGRO";
row2["ALTURA"] = "ALTO";
dt.Rows.Add(row2);
DataRow row3 = dt.NewRow();
row3["PESO"] = "OBESO";
row3["ALTURA"] = "BAIXO";
dt.Rows.Add(row3);
I would like to scroll through this datatable and add the results to a list so that the result looks like this:
Dictionary (where weight is the key and height is the value)
THIN
- LOW
- TALL
OBESE
- LOW
I want to group the heights for each type of weight
And how you tried?
– Leandro Angelo