Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
An AndAlso Operator or an OrElse Operator uses operands of a class or structure type, when that class or structure does not define a required operator.
Because you do not define a short-circuiting operator (AndAlso or OrElse) directly, you must define the corresponding logical and determinant operators. The following table shows the required operators.
| Short-circuiting operator | Logical operator | Determinant operator |
|---|---|---|
AndAlso |
And Operator | IsFalse Operator |
OrElse |
Or Operator | IsTrue Operator |
Visual Basic uses these logical and determinant operators to construct the short-circuiting logic for AndAlso or OrElse. For this to work properly, both operands and the return value of your And or Or definition must be of the containing type, that is, the type of the class or structure in which you are defining And or Or.
Error ID: BC33035
To correct this error
- Define the
AndandIsFalseoperators, or theOrandIsTrueoperators, in the class or structure used for the operand type of theAndAlsoorOrElseoperator. Be sure the operands forAndorOrare of the type of the class or structure in which you define it.