Atulya Panda
How to initialize Dictionary<int, string> using collection initialize?
Posted by Atulya Panda in ASP.NET Programming on Nov 26, 2012
  • 1
  • 2
  • 1536
Do you know the answer for this question? Post it below.
Guest
Posted by keerthi rakasi on Feb 28, 2013
  • 0

it will store values in key/value pair.And the syntax is
Dictionary obj=new Dictionary();
obj.Add(1,"jan");
obj.Add(2,"feb");

Posted by Atulya Panda on Nov 26, 2012
  • 0

Dictionary t = new Dictionary() { {1, “a”}, {2, “vb”}, {3, “c”}};


Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS

PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2014© C# Corner. All contents are copyright of their authors.