Click to Rate and Give Feedback
TechNet
TechNet Library
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
.NET Framework Class Library
System.Collections.Generic Namespace

The System.Collections.Generic namespace contains interfaces and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.

  ClassDescription
Public classComparer<(Of <(T>)>)Provides a base class for implementations of the IComparer<(Of <(T>)>) generic interface.
Public classDictionary<(Of <(TKey, TValue>)>)Represents a collection of keys and values.
Public classDictionary<(Of <(TKey, TValue>)>)..::.KeyCollectionRepresents the collection of keys in a Dictionary<(Of <(TKey, TValue>)>). This class cannot be inherited.
Public classDictionary<(Of <(TKey, TValue>)>)..::.ValueCollectionRepresents the collection of values in a Dictionary<(Of <(TKey, TValue>)>). This class cannot be inherited.
Public classEqualityComparer<(Of <(T>)>)Provides a base class for implementations of the IEqualityComparer<(Of <(T>)>) generic interface.
Public classHashSet<(Of <(T>)>)Represents a set of values.
Public classKeyedByTypeCollection<(Of <(TItem>)>)Provides a collection whose items are types that serve as keys.
Public classKeyNotFoundExceptionThe exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.
Public classLinkedList<(Of <(T>)>)Represents a doubly linked list.
Public classLinkedListNode<(Of <(T>)>)Represents a node in a LinkedList<(Of <(T>)>). This class cannot be inherited.
Public classList<(Of <(T>)>)Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
Public classQueue<(Of <(T>)>)Represents a first-in, first-out collection of objects.
Public classSortedDictionary<(Of <(TKey, TValue>)>)Represents a collection of key/value pairs that are sorted on the key.
Public classSortedDictionary<(Of <(TKey, TValue>)>)..::.KeyCollectionRepresents the collection of keys in a SortedDictionary<(Of <(TKey, TValue>)>). This class cannot be inherited.
Public classSortedDictionary<(Of <(TKey, TValue>)>)..::.ValueCollectionRepresents the collection of values in a SortedDictionary<(Of <(TKey, TValue>)>). This class cannot be inherited
Public classSortedList<(Of <(TKey, TValue>)>)Represents a collection of key/value pairs that are sorted by key based on the associated IComparer<(Of <(T>)>) implementation.
Public classSortedSet<(Of <(T>)>)Represents a collection of objects that is maintained in sorted order.
Public classStack<(Of <(T>)>)Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type.
Public classSynchronizedCollection<(Of <(T>)>)Provides a thread-safe collection that contains objects of a type specified by the generic parameter as elements.
Public classSynchronizedKeyedCollection<(Of <(K, T>)>)Provides a thread-safe collection that contains objects of a type specified by a generic parameter and that are grouped by keys.
Public classSynchronizedReadOnlyCollection<(Of <(T>)>)Provides a thread-safe, read-only collection that contains objects of a type specified by the generic parameter as elements.
  InterfaceDescription
Public interfaceICollection<(Of <(T>)>)Defines methods to manipulate generic collections.
Public interfaceIComparer<(Of <(T>)>)Defines a method that a type implements to compare two objects.
Public interfaceIDictionary<(Of <(TKey, TValue>)>)Represents a generic collection of key/value pairs.
Public interfaceIEnumerable<(Of <(T>)>)Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Public interfaceIEnumerator<(Of <(T>)>)Supports a simple iteration over a generic collection.
Public interfaceIEqualityComparer<(Of <(T>)>)Defines methods to support the comparison of objects for equality.
Public interfaceIList<(Of <(T>)>)Represents a collection of objects that can be individually accessed by index.
Public interfaceISet<(Of <(T>)>)Provides the base interface for the abstraction of sets.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Need performance consideration and comparision of feature list      SivaJi   |   Edit   |   Show History
Performance considerations and perhaps a comparision of feature list between different collections will help highly to make better apps. Why no C# syntax ? Need a little more explanation too.
Tags What's this?: Add a tag
Flag as ContentBug
@Chomilino - Here's a tree class for ya      hoodaticus   |   Edit   |   Show History
public class Node<T>
     public List<Node<T>> Children = new List<Node<T>>();
     public T Value;
end class

Use it like this:

Node<string> root = new Node<string>() { Value = "I am the root node!" };

Node<string> child = new Node<string>() { Value = "I am a child of the root node!" }; 
root.Children.Add(child);

Node<string> sibling = new Node<string>() { Value = "I am a sibling of child!" };
root.Children.Add(sibling);

Node<string> grandchild = new Node<string>() { Value = "I am a grandchild of the root node!"};
child.Children.Add(grandchild);
Tags What's this?: Add a tag
Flag as ContentBug
More classes      Chomilino   |   Edit   |   Show History
A Tree class would be useful.
Tags What's this?: Add a tag
Flag as ContentBug
It would be useful a Tree class      Chomilino   |   Edit   |   Show History
It would be useful a Tree class
Tags What's this?: Add a tag
Flag as ContentBug
Yea performance indicators would be helpful for these collections      MunishGoyal[MSFT]   |   Edit   |   Show History
But I guess, they are more or less same as the structure name conveys (List, Hashtable etc. ) in theory. But definitely I have come across significant variations due to the implementation differences. So the performance indicators (O notation) should be made available for various operations.
Tags What's this?: Add a tag
Flag as ContentBug
Performance Stats      BozoJoe   |   Edit   |   Show History
Would be nice to get performance and O notation differences here.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker