I this is a part of my code in C#:
SqlDataReader reader = command.ExecuteReader();
ArrayList readertmp = new ArrayList();
while (reader.Read())
{
readertmp.Add(reader);
}
reader contains several columns such as “name”, “age” and …
now I want to sort “readertmp” by one of the columns for example “name”.
anynody help me?
if you want to try a datatable you can do
this fills the table with your data. you can then use a dataview to sort the data.
also, as others have suggested you can just sort in your sql statement