Hot to avoid exception if we are adding items into Dictionary?

 Posted by Rajesh_Kumar on 1/17/2014 | Category: ASP.NET Interview questions | Views: 1867 | Points: 40

Always check ContainsKey method of Dictionary to avoid exceptions.

If (Not dict.ContainsKey(Key)) Then

End If

It checks whether key is there in a dictionary or not.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response