Summary


This chapter took a look at working with different kind of collections. While arrays are fixed in size, you can use lists for dynamically growing collections. For accessing elements on a first in, first out basis, there’s a queue, and there’s a stack for last in, first out operations. Linked lists allow for fast inserting and removing of elements but are slow for searching. With keys and values you can use dictionaries, which are fast for searching and inserting elements.

In this chapter, you’ve seen a lot of interfaces and their use for accessing and sorting collections. You’ve also seen some specialized collections, such as BitArray and BitVector32, which are optimized for working with a collection of bits.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net