deleyd
asked on
Is ConvertAll necessary?
I have a List<A> listA a list of objects of type A. I want to make a new list. Is there any difference between the following:
given: List<A> listA
var List<A> newListA = new List<A>(listA);
var List<A> newListA = new List<A>(listA.ConvertAll((x) => (A)x));
I'm trying to figure out why some old code has this .ConvertAll in it and if it's necessary.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Results in the following output --saige-