'And' expected

A comparison operator other than And has been used to combine two or more Equals operators in a Join or Group Join clause. Only the And operator is allowed to combine multiple Equals operators in a Join or Group Join clause.

Error ID: BC36620

To correct this error

  • Restructure the Equals clauses to make comparisons by using only the And operator. The following is an example:

    Dim petOwnersJoin = From pers In people _
                        Join pet In pets _
                        On pet.Owner Equals pers And _
                           pet.Name = pers.PetName_
                        Select pers, pet
    

See Also

Tasks

How to: Combine Data with LINQ by Using Joins (Visual Basic)

Concepts

Introduction to LINQ in Visual Basic

Reference

Join Clause (Visual Basic)

Group Join Clause (Visual Basic)

Other Resources

LINQ in Visual Basic