You are writing a custom dictionary.
The custom-dictionary class is named MyDictionary.
You need to ensure that the dictionary is type safe.
Which code segment should you use?
A.
class MyDictionary : Dictionary
B.
class MyDictionary : HashTable
C.
class MyDictionary : IDictionary
D.
class MyDictionary { … }
Dictionary t = new Dictionary();
MyDictionary dictionary = (MyDictionary)t;
Correct answer is A