Anyone who has used ADO.Net is familiar with DataTables and Dataviews. These objects bring a whole lot simplicity to data manipulation in .Net. Previously in ADO.Net 1.1 DataSets and DataTables had a little performance issues compared to Datareader, however, it has been greatly improved in 2.0. Anyway, my intent here is not to compare the two, but to point out something I was unaware of. Everyone knows that dataview has features which allow you to sort and filter data. If you have a sorted dataview and try to access the items by using
DataView.Table.Rows[0][2]
you simply get back the data that was in the datatable and is not sorted (its returning DataRow). This is the only explicit properties exposed when you are using the Dataview. I spent whole lot a time trying to figure out why it wasn't sorting, found out that dataview is actually iterated just by indexes.
DataView[0][2]
This returns the item that is actually sorted (returns DataRowView). So much for explicit coding! Anyway, something that I won't fall into again and waste time trying to figure out.