Share via


Selecting a Collection Class

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

Consider the following questions:

LINQ to Objects

LINQ to Objects enables developers to use LINQ queries to access in-memory objects as long as the object type implements IEnumerable or IEnumerable<T>. LINQ queries provide a common pattern for accessing data, are typically more concise and readable than standard foreach loops, and provide filtering, ordering, and grouping capabilities. In addition, LINQ queries can also provide performance improvements. For more information, see LINQ to Objects.

See Also

Reference

System.Collections

System.Collections.Specialized

System.Collections.Generic

Other Resources

Creating and Manipulating Collections