From this code I can call bmwCars.CopyToDataTable() as I expected.
var bmwCars = from car in dataTable.AsEnumerable()
where car.Field<string>("Make").ToLower().Equals("bmw")
select car;
But when I have change some statement of code to below, I can't call CopyToDataTable(), why?
var bmwCars = from car in dataTable.AsEnumerable()
where car.Field<string>("Make").ToLower().Equals("bmw")
select new
{
Make = car.Field<string>("Make"),
Color = car.Field<string>("Color"),
PetName = car.Field<string>("PetName")
};