Understanding the Let Keyword

The Visual Basic syntax offers a keyword named Let that can be used for defining temporary identifiers within query expressions. The following code shows how you can query Windows Forms controls to get a sequence of text boxes:

image

The Let keyword allows defining a temporary identifier so that you can perform multiple operations on each item of the sequence and then invoke the item by its temporary identifier.

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.