Short-Circuiting Operators (AndAlso - OrElse)

Download vb.net eBook

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.

Related Examples

Stats

100 Contributors: 4
Wednesday, July 27, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook