Cast List to List
Technology | C# |
---|---|
Editor of the Page | Latif Bahadır ALTUN |
List<X> list = yList.Cast<X>().ToList();
or
List<X> modelList = yList.Select(y=> new X{ parameter_1 = y.parameter_1_too, parameter_2 = y.parameter_2_too, ...etc }).ToList();
Technology | C# |
---|---|
Editor of the Page | Latif Bahadır ALTUN |
List<X> list = yList.Cast<X>().ToList();
or
List<X> modelList = yList.Select(y=> new X{ parameter_1 = y.parameter_1_too, parameter_2 = y.parameter_2_too, ...etc }).ToList();