Synopses & Reviews
Build the skills to apply Microsoft .NET collections effectively
Put .NET collections to work—and manage issues with GUI data binding, threading, data querying, and storage. Led by a data collection expert, you'll gain task-oriented guidance, exercises, and extensive code samples to tackle common problems and improve application performance. This one-stop reference is designed for experienced Microsoft Visual Basic and C# developers—whether you’re already using collections or just starting out.
Discover how to:
- Implement arrays, associative arrays, stacks, linked lists, and other collection types
- Apply built in .NET collection classes by learning their methods and properties
- Add enumerator, dictionary, and other .NET collection interfaces to your classes
- Query collections by writing simple to complex Microsoft LINQ statements
- Synchronize data across threads using built in .NET synchronization classes
- Enhance your custom collection classes with serialization support
- Use simple data binding to display collections in Windows Forms, Microsoft Silverlight, and Windows Presentation Foundation
Dive deep into .NET collection objects—and learn how to manage issues with GUI data binding, threading, data querying, and storage. Led by collection expert Calvin Janes, you'll gain task-oriented guidance and extensive code samples that enable you to tackle problems and improve application performance. It's an ideal reference for any application developer using the .NET Framework.
Discover how to:
- Use collection types such as lists, arrays, circular buffers, and dictionaries
- Learn how to enumerate the custom collections
- Implement collection interfaces, base classes, and generics—and know when to use a linked list, array, or basic list
- Use collection objects with GUIs, Microsoft LINQ, serialization, sorting, and notifications
- Write and retrieve collection objects from storage
- Get a complete reference that defines each collection object type
About the Author
Calvin Janes is a consultant and expert in creating and using collection types.
Table of Contents
Introduction; Who Should Read This Book; Who Should Not Read This Book; Organization of This Book; Conventions and Features in This Book; System Requirements; Code Samples; Acknowledgments; Errata & Book Support; We Want to Hear from You; Stay in Touch; Collection Basics; Chapter 1: Understanding Collections: Arrays and Linked Lists; 1.1 Array Overview; 1.2 Array Implementation; 1.3 Linked List Overview; 1.4 Linked List Implementation; 1.5 Summary; Chapter 2: Understanding Collections: Associative Arrays; 2.1 Associative Array Overview; 2.2 Associative Array Implementation; 2.3 Summary; Chapter 3: Understanding Collections: Queues, Stacks, and Circular Buffers; 3.1 Queue Overview; 3.2 Queue Implementation; 3.3 Stack Overview; 3.4 Stack Implementation; 3.5 Circular Buffer Overview; 3.6 Circular Buffer Implementation; 3.7 Summary; .NET Built-in Collections; Chapter 4: Generic Collections; 4.1 Understanding the Equality and Ordering Comparers; 4.2 Understanding Delegates, Anonymous Methods, and Lambda Expressions; 4.3 List(T) Overview; 4.4 Using the List(T) Class; 4.5 LinkedList(T) Overview; 4.6 Using the LinkedList(T) Class; 4.7 Summary; Chapter 5: Generic and Support Collections; 5.1 Queue(T) Overview; 5.2 Using the Queue(T) Class; 5.3 Stack(T) Overview; 5.4 Using the Stack(T) Class; 5.5 Dictionary(TKey,TValue) Overview; 5.6 Understanding Dictionary(TKey,TValue) Implementation; 5.7 Using the Dictionary(TKey,TValue) Class; 5.8 BitArray Overview; 5.9 Using the BitArray Class; 5.10 CollectionBase and DictionaryBase Overview; 5.11 HashSet(T) Overview; 5.12 Using the HashSet(T) Class; 5.13 Sorted Collections Overview; 5.14 Summary; Using Collections; Chapter 6: .NET Collection Interfaces; 6.1 Enumerators (IEnumerable and IEnumerator) Overview; 6.2 Adding Enumeration Support to Classes; 6.3 ICollection and ICollection(T) Overview; 6.4 Adding Collection Support to Classes; 6.5 IList and IList(T) Overview; 6.6 Adding IList(T) and IList Support to Classes; 6.7 IDictionary(TKey,TValue) Overview; 6.8 Adding Key/Value Pair Support to Classes; 6.9 Summary; Chapter 7: Introduction to LINQ; 7.1 What Is LINQ?; 7.2 LINQ Basics; 7.3 Getting Started with LINQ; 7.4 Summary; Chapter 8: Using Threads with Collections; 8.1 What Is a Thread?; 8.2 What Is Thread Synchronization?; 8.3 .NET Framework Tools for Synchronization; 8.4 Adding Synchronization Support to Your Collection Classes; 8.5 SyncRoot vs. the Synchronized Wrapper Class (IsSynchronized); 8.6 Using the Monitor Class; 8.7 Using the ReaderWriterLockSlim Class; 8.8 Implementing a Synchronized Wrapper Class; 8.9 Handling Collection Changes While Enumerating; 8.10 Synchronized Collection Classes; 8.11 Summary; Chapter 9: Serializing Collections; 9.1 Serialization; 9.2 Using the Serializer Formatters; 9.3 Adding Serialization Support to Collection Classes; 9.4 Summary; Using Collections with UI Controls; Chapter 10: Using Collections with Windows Form Controls; 10.1 Simple Binding; 10.2 Two-Way Data Binding; 10.3 Understanding the Sample Code; 10.4 Summary; Chapter 11: Using Collections with WPF and Silverlight Controls; 11.1 INotifyCollectionChanged Overview; 11.2 Implementing the INotifyCollectionChanged Interface; 11.3 ObservableCollection(T) Overview; 11.4 Using the ObservableCollection(T) Class; 11.5 ICollectionView and CollectionView Overview; 11.6 Understanding the Sample Code; 11.7 Summary; About the Author;