I have a dataset that I'm feeding into a hashtable:
Public Questions As Hashtable = New Hashtable
Dim ds As DataSet = instCaisse.GetCaisseQuestions()
For i As Integer = 0 To (ds.Tables(0).Rows.Count - 1)
Questions.Add(ds.Tables(0).Rows(i).Item("questionPart"),ds.Tables(0).Rows(i).Item("question"))
Next
When I feed the information from the database into my dataset (via stored procedure) everything is ordered alphabetically thanks to an order by in the stored proc's select statement.
When I load up the data from the hashtable, it appears unordered. Am I missing something, does hashtable do some sort of sorting that I'm not aware of?
In that respect I may end up just using a SortedList or a Dictionary to retain the ordering of the values. If that's the case which is the better option to use?