Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 9392 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > what is dictionary in c#? ...
Venky.Net

what is dictionary in c#?

Replies: 2 | Posted by: Venky.Net on 4/28/2012 | Category: C# Forums | Views: 1415 | Status: [Member] | Points: 10  


hi
what is dictionary and why do use this keyword with example?


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Gow.Net
Gow.Net  
Posted on: 4/28/2012 7:18:32 AM
Level: Starter | Status: [Member] | Points: 25

dictionary is a collection of key value and text value
example
 Dictionary<int, string> obja = new Dictionary<int, string>();

obja.Add(1, "DotNet");
obja.Add(2, "Java");
obja.Add(3, "Php");
foreach(int k in obja.Keys)
{
Console.WriteLine(k);
}
foreach (string kk in obja.Values)
{
Console.WriteLine(kk);
}





gowthaman8870226416

Venky.Net, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Veerac85
Veerac85  
Posted on: 4/30/2012 5:30:48 PM
Level: Starter | Status: [Member] | Points: 25

refer to this link. It explains DIctionary object in DOTNET with various examples and scenarios.
http://technico.qnownow.com/2012/04/19/dictionary-in-c/

Venky.Net, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/19/2013 10:20:31 AM