Which code segment should you use?

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?

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;



Leave a Reply 1

Your email address will not be published. Required fields are marked *


networkmanagers

networkmanagers

Correct answer is A