PDA

Click to See Complete Forum and Search --> : [2.0] is sortedlist (in c#) same as Hash table (in vb.net)


bnathvbdotnet
Apr 13th, 2006, 01:48 PM
Is SortedList (in C#) same as Hash table(in vb.net)?

thanks

sorry for posting second time.

David Anton
Apr 13th, 2006, 06:03 PM
Both of these are common to all .NET languages.

jmcilhinney
Apr 13th, 2006, 08:03 PM
As David says, they are both members of the System.Collections namespace. They behave similarly but if you enumerate a SortedList the items will be returned ordered by key. The Hashtable cares nothing for order. You can get the keys and then get the values that correspond to those keys but no representation is made about what order the keys will be returned in.