How to check whether Dictionary contains key or not?

 Posted by Rajesh_Kumar on 1/16/2014 | Category: C# Interview questions | Views: 588 | Points: 40
Answer:

With the help of ContainsKey method,we can check whether dictionary has a key or not?

If(dict_names.ContainsKey["name"])

return true;
else
return false;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response