Chapter 10, “Collections,” covers lists, queues, stacks, dictionaries, and linked lists. This chapter continues with special collections, such as collections for dealing with bits, collections that can be observed when changed, collections that cannot be changed, and collections that can be accessed from multiple threads simultaneously.
WORKING WITH BITS
If you need to deal with a number of bits, C# 7 has extensions like the binary literal and the number separator that are covered in Chapter 2, “Core C#,” and Chapter 6, “Operators and Casts.” When you work with binary data, you can also use the class
BitArray and the struct
BitArray is located in the namespace
BitVector32 is in the namespace
System.Collections.Specialized. The most important difference between these two types is that
BitArray is resizable—which ...