Project 1
In a new project, modify your Key-Value store from last week to use a generic type parameter rather than typing your "value" instance field in KeyValue
as an object
.
Project 2
In a new project, instantiate an instance of each of the generic collection classes described in Chapter 18:
- List,
- LinkedList,
- Queue,
- Stack,
- Dictionary<TKey, TValue>,
- SortedList<TKey, TValue>, and
- HashSet).
Insert 5 values of a type of your choosing into each of these collections, then iterate over the collection and print each value to the console. Print a line above your iteration stating which data structure you're printing from, and print a blank line between the last item in the collection and the description of the following data structure.