How to add items into Dictionary?

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

Add method is used to add a item into dictionary.

For example:-

Dictionary<int,string> dict_names = new Dictionary<int,string>();

dict_names.Add("name","rajesh");
dict_names.Add("surname","sathua");


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response