I have a Dictionary dictionary1 and I need to convert it into a List where Data has the properties lab
Dictionary dictionary1
List
Data
lab
.NET already has a data type that does what Data would do: KeyValuePair. Dictionary already implements IEnumerable>, just cast to it.
KeyValuePair
IEnumerable>
Dictionary blah = new Dictionary(); IEnumerable> foo = blah;