You are developing a .NET Framework 2.0 application used to store a type-safe list of names and e-mail addresses.
The list will be populated all at ones from the sorted data which means you well not always need to perform insertion or deletion
operations on the data.
You are required to choose a data structure that optimizes memory use and has good performance.
What should you do?
A.
The System.Collections.Generic.SortedList class should be used
B.
The System.Collections.HashTable class should be used
C.
The System.Collections.Generic.SortedDictionary class should be used
D.
The System.Collections.SortedList class should be used
Explanation:
The SortedList generic class should be used in the scenario class as it provides type safety compared against the System.Collections.SortedList class.
Incorrect Answers:
B: The System.Collections.HashTable class should not be used as this class provides no type safety.
C, D: Although this is very similar to the SortedList class the SortedList class should be used instead in the scenario.
I choose A