Multiple choice technology programming languages

LINQ query to Select and return all the rows from Product table and display the product names.

  1. Dim query = From product In products.AsEnumerable() Select product

  2. Dim query as select product From product In products.AsEnumerable()

  3. Dim query = From p In products.AsEnumerable() Select p

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Option A correctly uses LINQ to DataSet syntax in VB.NET with AsEnumerable() to enable LINQ queries on DataTable rows. The Select clause returns all product rows which can then be iterated to display product names. Option B has invalid syntax, Option C uses a different alias but doesn't address displaying names specifically.