Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Answers for Microsoft%20.NET%20Online%20Test%20-%20Online%20Exam%20-%20Online%20Quiz%20-%20Mock%20Test

←Go Back to Online Practice Test

Ques. 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?
Option 1. class MyDictionary : Dictionary<string, string>
Option 2. class MyDictionary : HashTable
Option 3. class MyDictionary : IDictionary
Option 4. class MyDictionary { ... } Dictionary<string, string> t = new Dictionary<string, string>(); MyDictionary dictionary = (MyDictionary)t;

Ans. Option 4

Please provide the reason below. The best provided reason will be displayed with your name(if you are logged-in) on website.
Enter Reason
 
Is it helpful? Yes No
©2024 WithoutBook