If you know it is specifically a
List<T> and not another collection type then you can use
Converts the elements in the current
List<T>to another type, and returns a list containing the converted elements.
List<string> myObjectNames = myObjectList.ConvertAll(x => x.Name);
List<string> myObjectNames = myObjects.Select(x => x.Name).ToList();
- Convert list of one type to list of another type in C# 3.5
- Convert a list of one type to another
- linq lambda convert object with list of objects of the same type to another object
- Create a list of one object type from a list of another using Linq
- Convert CollectionBase to List or data type usable with Linq
- Convert or map a list of class to another list of class by using Lambda or LINQ?
- How to convert Generic List<anonymous type > to Generic List <Classname>?
- List of Interfaces vs. List of Derived Type - Cannot Convert Expression Type to Return Type
- Cannot convert source type to target type List<KeyValuePair> Linq
- How to Convert Anonymous Type to List <dynamic> using Linq to SQL in C#
- How to convert nested object from one type to another
- Convert or map a class instance to a list of another one by using Lambda or LINQ?
- Copy a list of objects to another typed list in one line of code
- Cannot convert source type system.nullable to target type int
- Convert datatable to list of generic type
- How to convert Collection of One Class type to Another Class Type collection in Entity Framework
- How do I get a list of integers that exist in one collection, but not in another of a different type using LINQ?
- Convert List of object into another List of object
- C# Transform list from one type to another
- convert object list to type array and remove null values
- Cannot implicit convert type List to IEnumerable while grouping with Linq
- EF code first cannot convert type to int
- Convert Anonymous Type to List <T> using Linq to SQL in C#
- linq to entities cannot convert type Icollection to type List
- How to add List<T> containing item of type List<string> ,int,string into another List
- Convert one list to the other list type
- Update List of objects based on matching type in Dictionary and another List using C# collection
- C# LINQ Find List Inside Another List, Better way to code this than a foreach loop
- Cannot implicitly convert type system linq IQueryable to system collections generic List
- Can't convert one generic list to another
- How to use TryCatch Statement in ToDictionary C#?
- linq query how to take out spaces in strings
- How to do a "where in values" in LINQ-to-Entities 3.5
- Cache delegate of compiled Dynamic Linq Func<> *without* params?
- Using C# Linq ForEach() in F#
- LINQ - take x objects from database for each object property value
- LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance
- how to write custom Linq groupBy
- Error Trying to pass a IEnumerable list with Linq and Mvc Web API
- How do I perform a dynamic select in Linq?
- Get values from database with specific time interval
- Flatten hierarchical list of types with selectmany linq
- LINQ Join tables, group and sum items only if values in stock is 1
- Recursive Linq Grouping
- Can a generic method return the property I specify
- Linq To Xml datasource for grid view is not working. The grid show no rows
- Extract items of IEnumerable<T> whose Key-Value is equal to one of the KeyValues in IEnumerable<U>
- Linq query result to table with dynamic cols
- How to update a list based on more than one Condition using LINQ C#
- Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed