Chapter 6, The .NET Collections
System.Collections,System.Collections.Generic,System.Collections.Concurrent, andSystem.Collections.Specialized.- Big O notation is used to determine algorithmic efficiency.
- Algorithmic efficiency determines how time scales with respect to input.
- Benchmarking showed that using
IList<T>was faster than usingList<T>, and so usingIList<T>is preferred over usingList<T>. - You can use either. What you choose depends upon your performance requirements and what you are trying to achieve. There are trade-offs between using collections and arrays. Understanding these trade-offs will help you choose which option you should apply to your code.
- Indexers enable objects in classes to be accessed in the same way as you access items in an array.
IEnumerator<T>is faster at iterating through in-memory collections thanIEnumerable<T>.- In terms of memory and speed performance, querying the database...