views:

758

answers:

3

Does anyone know of a good overview of the different C# collection types? I am looking for something showing which basic operations such as Add, Remove, RemoveLast etc. are supported, and giving the relative performance.

It would be particularly interesting for the various generic classes - and even better if it showed eg. if there is a difference in performance between a List<T> where T is a class and one where T is a struct.

A start would be a nice cheat-sheet for the abstract data structures, comparing Linked Lists, Hash Tables etc. etc. Thanks!

+5  A: 

This isn't a cheat sheet but it is a good place to start learning: Collection Classes (C# Programming Guide).

Edit: I would look specifically at this related section: Selecting a Collection Class .

Be sure to choose your System.Collections class carefully. Using the wrong type can restrict your use of the collection.

Andrew Hare
+3  A: 

I would also check out dotNET PowerCollections and related documentation. Theory there is NICE. PowerCollections Site

GregC
+2  A: 

Exactly what you were looking for does exists. I forgot the link and in attempting to find it I stumbled across this question. Anyway I found the link and thought I should share it: http://creators.xna.com/downloads/?id=123

Benjamin Dobell
thank you, just what I was looking for :)
Joel in Gö