HLRosenberger
asked on
Help with AsEnumerable(), LINQ
What does AsEnumerable() do in the code below? The code works with or without it.
Dim results = From car In cars.AsEnumerable()
Select car.make, car.model, car.color
Where make = "Honda"
Order By model Descending
Dim results = From car In cars.AsEnumerable()
Select car.make, car.model, car.color
Where make = "Honda"
Order By model Descending
In LINQ AsEnumerable() method is used to convert / cast specific type of given list items to its IEnumerable equivalent type.
This is an extension method that only applies to DataTables, though.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!