Dim namePriceQuery = From prod In products
Select prod.Name, prod.Price
OR
Dim namePriceQuery = products.select(function(x) New With{ Key .newName =x.name _
, Key .newPrice= x.price})
To my knowledge the only difference is with with the second expression has the benefits of the Key keyword. What exactly is the difference between the two?? And what scenarios would I choose to use one or the other in? What are the pros and cons of one vs the other?
I am assuming the C# syntax equivalent will work the same and should be used in similar before mention scenarios. Thank you very much!