The following table shows all the Boolean operators supported by the F# language. Let's take variable X as true and Y as false:
Operator |
Description |
Example |
&& |
Boolean AND operator. If both the bool values are true means 1, then the condition is true. |
(X && Y) is false |
|| |
Boolean OR operator. If either of the two bool values is true means 1, then the condition is true. |
(X || Y) is true |
not |
Boolean NOT operator. If the condition is true, then the logical NOT operator will become false and vice versa. |
not (X && Y) is true |