- 04 May 2024
- 1 Minute to read
- DarkLight
Boolean
- Updated on 04 May 2024
- 1 Minute to read
- DarkLight
General
Values of type Boolean can have either of two states: True or False. A detailed explanation of the data-type can be found in the Boolean Data-Type article of the Visual Basic .NET language documentation.
Constants
Constant boolean values are written by using the keywords True and False. The following expression returns the boolean value True:
True
The following expression returns the boolean value False:
True
Operators
The following operators can be used with boolean values:
Operator | Description |
---|---|
Not | This operator inverts the boolean value following the operator; Not True will therefore return False and Not False returns True. |
And | This operator performs a logical And operation which will only return True if both values on either side of the operator are True. |
Or | This operator performs a logical Or operation which will return True if at least one of the values on either side of the operator is True. |