Roger Jennings

I see that C# 3.0 has adopted let for variable assignment within LINQ queries. It works fine for me and nicely parallels XQuery.

Are there plans to provide Let for VB 9.0

--rj



Re: LINQ Project General Let Keyword for Visual Basic

AmandaS_MS

Hi Roger --

The Beta1 has support for Let clauses, like so:

Dim items() As Item = {New Item With {.Quantity = 1}, New Item With {.Quantity = 2}}

Dim query = From item In items _

From q2 = item.Quantity * 2 _

Select item, q2

However, based on internal feedback (people within Microsoft using VB to write real apps -- what we call "dogfooding") we'll be changing it to use the Let keyword for Beta2:

Dim items() As Item = {New Item With {.Quantity = 1}, New Item With {.Quantity = 2}}

Dim query = From item In items _

Let q2 = item.Quantity * 2 _

Select item, q2

Thanks,

Amanda Silver

Lead Program Manager

Visual Basic





Re: LINQ Project General Let Keyword for Visual Basic

Roger Jennings

Hi, Amanda,

Thanks for the response.

The Beta 2 Let implentation is much better.

--rj