Difference between Select and ConvertAll in C
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Select and ConvertAll both transform elements from one type into another, but they belong to different parts of the C# ecosystem and behave differently. The biggest differences are where they are available, when they execute, and what type they return. If you pick between them deliberately, the code becomes clearer and sometimes more efficient.
Select Is A LINQ Projection
Select is an extension method from LINQ. It works on any source that implements IEnumerable<T>, so it is broadly applicable across arrays, lists, query results, and many custom sequences.
The important detail is that Select uses deferred execution. The projection does not necessarily run when you call Select; it runs when you enumerate the result.
ConvertAll Belongs To List<T>
ConvertAll is an instance method on List<T>. It is narrower in scope because it only works when the source is already a List<T>, but it returns a new List<TResult> immediately.
This eager execution can be useful when you specifically want a concrete list right away and you are already holding a List<T>.
Deferred Versus Immediate Execution
This is the behavioral difference that matters most in real code.
This prints 10, 20, 30, and 40 because the query runs when enumerated, after the list has changed.
Now compare that with ConvertAll:
This prints only 10, 20, and 30 because the new list was created immediately.
Return Type Changes How You Compose Code
Select returns IEnumerable<TResult>, which makes it ideal for query pipelines.
ConvertAll returns List<TResult>, so it is less query-oriented. It is better when the end goal is already "give me another list."
When ConvertAll Is Reasonable
ConvertAll is not obsolete or wrong. It is a good fit when all of the following are true:
- the source is a
List<T>, - you want eager materialization,
- you want the result as
List<TResult>, - you do not need a larger LINQ chain.
That makes it a pragmatic choice in simple collection conversion code.
When Select Is Usually Better
Use Select when you need flexibility. It works with more collection types, composes naturally with Where, OrderBy, and GroupBy, and lets you decide later whether to materialize with ToList, ToArray, or not at all.
You also get the indexed overload:
That kind of composition is exactly where LINQ is strongest.
Common Pitfalls
- Using
Selectand forgetting that the query is deferred until enumeration. - Using
ConvertAllon a source that is not actually aList<T>. - Calling
Select(...).ToList()and then assuming it behaves exactly likeConvertAllin every surrounding context. - Choosing
ConvertAllinside a longer query pipeline whereSelectwould read more naturally. - Ignoring return types and then wondering why later LINQ operators or list-only methods are unavailable.
Summary
- '
Selectis a LINQ projection that works on anyIEnumerable<T>.' - '
ConvertAllis aList<T>method that eagerly returns a newList<TResult>.' - The most important difference is deferred execution versus immediate execution.
- Use
Selectfor flexible query composition and broad collection support. - Use
ConvertAllwhen you already have aList<T>and want another list immediately.

