Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

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
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

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
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

Thanks!