I have an array of Car objects
I want to convert them to a list of Vehicle objects
I thought it would work
Vehicle[] vehicles = cars.ConvertAll(car=> ConvertToVehicle(car)).ToArray();
but he complains that ConvertAll requires two parameters.
here is the error:
Error 2 Using the general method "System.Array.ConvertAll (TInput [], System.Converter)" requires arguments of type "2" C: \ svncheckout \ latestTrunk \ Utility \ test.cs 229 33
Am I using the wrong method here?
source
share