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
Perhaps you could use LINQ?
dictionary1.Select(p => new Data(p.Key, p.Value)).ToList()
This is however using yield and thus loops in the background...
yield