Range variable <variable> hides a variable in an enclosing block, a previously defined range variable, or an implicitly declared variable in a query expression

A range variable name specified in a Select, From, Aggregate, or Let clause duplicates the name of a range variable already specified previously in the query, or the name of a variable that is implicitly declared by the query, such as a field name or the name of an aggregate function.

Error ID: BC36633

To correct this error

  • Ensure that all range variables in a particular query scope have unique names. You can enclose a query in parentheses to ensure that nested queries have a unique scope.

See Also

Concepts

Introduction to LINQ in Visual Basic

Reference

From Clause (Visual Basic)

Let Clause (Visual Basic)

Aggregate Clause (Visual Basic)

Select Clause (Visual Basic)