Collection Classes on C# related Questions and Answers


Question :   A HashTable t maintains a collection of names of states and capital city of each state. Which of the following is the correct way to find out whether ''Kerala'' state is present in this collection or not?
1. t.ContainsKey(''Kerala'');
2. t.HasValue(''Kerala'');
3. t.HasKey(''Kerala'');
4. t.ContainsState(''Kerala'');
5. t.ContainsValue(''Kerala'');
Answer :   1 - t.ContainsKey(''Kerala'');  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter