C# Programming - Collection Classes - Discussion

Discussion Forum : Collection Classes - General Questions (Q.No. 8)
8.
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?
t.ContainsKey("Kerala");
t.HasValue("Kerala");
t.HasKey("Kerala");
t.ContainsState("Kerala");
t.ContainsValue("Kerala");
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
1 comments Page 1 of 1.

Swati said:   9 years ago
Find the value: So use t.containsValue ("Kerala");.

Post your comments here:

Your comments will be displayed after verification.