System.LINQ.Dynamic: select ("new class name (...)") in List <T> (or any other enumerated collection <T>)
What I want , but instead of doing
var carsPartial = cars.Select("new(name, year)").ToList();
I want to do this:
var carsPartial = cars.Select<car>("new car(name, year)").ToList<car>();
Thanks again and ask for clarification if necessary.
car class:
public class car { public string name { get; set; } public int year { get; set; } }
What's in cars: a bunch of data about cars with names and years like a database.
+6
2 answers