What I would like to do is use LINQ elegance while maintaining the iterator ....
substantially
Class A { int Position; string Name; }
If I have a list of strings, I want to project them into List<A> , but the position will be entered in the position ...
List<string> names;
sort of
List<A> foo = (from s in names select s).ToList();
but he also goes through and fills the position.
Is it possible?
{{Position:0,Name: "name1"},{Position:1, Name: "name2"}, {Position:2, Name: "name3"}....}
source share