ADBRITE ads links
You are here: CodeIdol.com > C# > Learning C# 2005 > Generics And Collections
Learning C# 2005
| 14.1. Generics
Until generics, all the collection classes (ArrayList, Stack, and Queue) were defined to hold objects of type Object (the root class). Thus, you could add integers and strings to the same class, and when you took items out of the co...
|
|
| 14.2. Collection Interfaces
The .NET Framework provides a number of interfaces
, such as IEnumerable and ICollection, that the designer of a collection must implement to provide full collection semantics. For example, ICollection all...
|
|
| 14.3. Creating Your Own Collections
The goal in creating
your own collections
is to make them as similar to the standard .NET collections as possible. This reduces confusion, and makes for easier-to-use classes and easie...
|
|
| 14.4. Framework Generic Collections
The .NET Framework
provides four very useful generic collections
, as enumerated earlier (List
, Stack, Queue, and Dictionary). The most common case is that rather than writing your own collection, you'll...
|
|
| 14.5. Summary
The .NET Framework provides a number of type-safe (generic) collections, including the list<t>, stack<t>, queue<t>, and dictionary<key><value>.You are free to create your own generic collection types as ...
|
|
| 14.6. Quiz
Question 141
What is the convention for naming an indexer?
Question 142
What types can be used in an indexer to index a collection?
Question 143
What are the preconditions for calling Sort( ) on an array?
Question 144
Wh...
|
|
You are here: CodeIdol.com > C# > Learning C# 2005 > Generics And Collections
|
|
Related tags
Popular Categories
Unix books and guides
AJAX popular information
C# language guides
Windows books and cookbooks
.......
|
|