Visual Basic .NET Language Short-Circuiting Operators (AndAlso - OrElse)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • result = expression1 AndAlso expression2
  • result = expression1 OrElse expression2

Parameters

ParameterDetails
resultRequired. Any Boolean expression. The result is the Boolean result of comparison of the two expressions.
expression1Required. Any Boolean expression.
expression2Required. Any Boolean expression.

Remarks

'AndAlso' and 'OrElse' are ShortCircuiting operators that means that the execution is shorter because the compiler doesn't evaluate all the expressions in a boolean comparision if the first one provides the desidered result.



Got any Visual Basic .NET Language Question?