Chapter 4. Generic Collections

After completing this chapter, you will be able to

  • Understand the equality and ordering comparers.

  • Understand delegates, anonymous methods, and lambda expressions.

  • Understand when and how to use the List(T) class.

  • Understand when and how to use the LinkedList(T) class.

Understanding the Equality and Ordering Comparers

It is important to know that some of the classes in the System.Collections.Generic namespace use an equality and ordering comparer in some of their methods. You can spend considerable precious time debugging code if you don’t fully understand these comparers.

Understanding the Equality Comparer

Some of the classes in the System.Collections.Generic namespace implement what is called a default equality comparison ...

Get Developer’s Guide to Collections in Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.