PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
class MyDictionary : Dictionary

B.
class MyDictionary : HashTable

C.
class MyDictionary : IDictionary

D.
class MyDictionary { … }
Dictionary t = new Dictionary();
MyDictionary dictionary = (MyDictionary)t;

One Comment on “Which code segment should you use?


Leave a Reply