Summary
In this chapter, you saw how the IEnumerable
and ICollection
interfaces form the basis of .NET data structures, and how they can be used to store multiple items. You created different types of collections depending on how each collection is meant to be used. You learned that the List
collection is most extensively used to store collections of items, particularly if the number of elements is not known at compile time. You saw that the Stack
and Queue
types allow the order of items to be handled in a controlled manner, and how the HashSet
offers set-based processing, while the Dictionary
stores unique values using a key identifier.
You then further explored data structures by using LINQ Query Expressions and Query Operators to apply queries to data, showing how queries can be altered at runtime depending on filtering requirements. You sorted and partitioned data and saw how similar operations can be achieved using both Query Operators and Query Expressions, each offering a...