Topic: LINQ ToDictionary()
Share/Save/Bookmark
Description: Sample code for populating a Generic Dictionary object with LINQ
Notes: You must have a references to the System.Linq and System.Collections.Generic classes.


MyObject myObject = someMethodThatPopulatesMyObject();

Dictionary
<string, string> dropDownValues = 
myObject.ToDictionary( x => x.Value, x => x.Value);