Click here to Skip to main content
15,898,842 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi all ,
Mine requirement is that I need a collection that gives me random access to its items ..can somebody suggest me ...

thnx
Posted
Comments
Sergey Alexandrovich Kryukov 15-Nov-11 22:57pm    
One requirement is specified, now think about your requirements.
--SA
Mehdi Gholam 16-Nov-11 0:55am    
Hash, List, Dictionary all do this.

1 solution

Most of them do, look at name space System.Collections.Generic. You choice should depend on your requirements. See http://msdn.microsoft.com/en-us/library/0sbxh9x2.aspx[^].

(Form those who might think they disagree: "random access" might mean by integer index, but the access by Key is also a random access; also, the generic classes implementing associative container based on access by Key also allow access by integer index.)

—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900