Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest and most efficient collection type in C#

I am building an application which will require a collection to hold about 10k of Strings.

Collection will be used as queue.

So was looking through different collection types in C# but could not figure out which one has best performance in regards to speed of doing Put and Get operation in Queue. Also should be capable of not allowing duplicates in the Queue/Collection.

EDIT based on the comments..

Any existing collection will be helpful. Or a custom collection which could out perform any existing collection will be great.

Thanks

like image 748
Kamil Dhuleshia Avatar asked Mar 26 '11 06:03

Kamil Dhuleshia


1 Answers

There is the OrderedDictionary class which keeps the insertion order but allows you to look up values by key.

like image 65
ChrisWue Avatar answered Sep 21 '22 16:09

ChrisWue