C#

Difference between Sorted LIst and HashTables in C# collections

Page 1 of 1

2 Replies - 1782 Views - Last Post: 23 October 2009 - 03:31 AM Rate Topic: -----

#1 schiranjeevi2007   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-June 09

C#

Post icon  Posted 22 October 2009 - 11:48 PM

please tell me exact difference between Sorted list and hash tables int the C# collections..i am little bit confused about both of them..so please clarify my doubt
Is This A Good Question/Topic? 0
  • +

Replies To: C#

#2 Momerath   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1021
  • View blog
  • Posts: 2,463
  • Joined: 04-October 09

Re: C#

Posted 23 October 2009 - 12:09 AM

A sorted list is sorted, while a dictionary is in whatever order the system wants it to be. If you were to iterate through the dictionary, most likely the order will be the order you placed the objects into the dictionary. IF you iterate through a sorted list, it will be in the order of the keys.
Was This Post Helpful? 0
  • +
  • -

#3 eclipsed4utoo   User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1536
  • View blog
  • Posts: 5,972
  • Joined: 21-March 08

Re: C#

Posted 23 October 2009 - 03:31 AM

I'd hate to say this, but isn't it quite obvious what the difference is? Just look at the names. The SORTEDList is sorted, the HashTable is not.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1