Range variable name can be inferred only from a simple or qualified name with no arguments

A programming element that takes one or more arguments is included in a LINQ query. The compiler is unable to infer a range variable from that programming element.

Error ID: BC36599

To correct this error

  • Supply an explicit variable name for the programming element, as shown in the following code:
Dim query = From var1 In collection1 
            Select VariableAlias = SampleFunction(var1), var1

See Also

Reference

Select Clause (Visual Basic)

Concepts

Introduction to LINQ in Visual Basic