Using Booleans in If Condition

Please can anyone tell me the type of booleans that I can use in the If Condition


Not sure what you mean by “types of booleans”. There is only one boolean datatype, and it is either set to True or False. Any expression, statement, method, or variable which returns the boolean datatype is valid in an If condition.


1 < 2
This returns True because it is an expression that returns a boolean.

If I have a variable of type Boolean and it is set to False, this is valid in the condition. It could also be set to Nothing, and this will be interpreted as False.

If I have string variable var and var = "Hello", then the expression var.Contains("el") returns True because “el” is in “Hello”. The Contains method will always return a boolean of True or False.

I mean how to say that “if (it) is not equal to (it) then”

How can i say “not equal”

<> is the operator for not equal. So you could say 1 <> 2, and that expression would return True.

Ok I will try

thanks for your help