Want to know about KeyValuePair in .Net C#

Last Reply on May 18, 2012 07:16 AM By Mudassar

Posted on May 18, 2012 07:15 AM


I want know some thing about this code what does it do and when we use it ?


Posted on May 18, 2012 07:16 AM

KeyValuePair as the name suggest is an object with 2 parts Key and Value so that we can store value in pairs


FruitId FruitName

1         Mango


Now List<KeyValuePair> allows you to have a Generic List of KeyValuePairs so that you can have multiple values


FruitId FruitName

1         Mango

2         Apple