I have the following cycle so that each time I go through the DataRow
add the value that touches more " :00
" and another equal with " :30
", the topic is in which I repeat the values that I already have by default and I want to generate a group by
to return the values I want only once:
for (int ii = 1; ii <= 24; ii++)
{
DataRow dr = rs.Tables[0].NewRow();
rs.Tables[0].Rows.Add((ii < 10 ? "0" : "") + ii.ToString() + ":00");
rs.Tables[0].Rows.Add((ii < 10 ? "0" : "") + ii.ToString() + ":30");
dr.AsEnumerable().GroupBy(row => row.Field<string>("Grupo"));
}