Difference between "And" and "AndAlso" , "Or" and "OrElse"

Hi,
I just share a basic concept for the begginer to understand that the difference between And and AndAlso , Or and OrElse.

AndAlso - Operator

This is used to connect two (or more) logical conditions checking like if (condition1 AndAlso condition2).
If the first condition is false, It won’t perform the second condition .
So our execution time is saving in a logical operation in which more conditions are combined using “AndAlso" operator.

And - Operator

This is used to connect two (or more) logical conditions checking like if (condition1 And condition2).
It will perform both condition. Even first condition is false .
So our execution time is losing .


OrElse - Operator

This is used to connect two (or more) logical conditions checking like if (condition1 OrElse condition2).
If the first condition is true, It won’t perform the second condition.
So our execution time is saving in a logical operation in which more conditions are combined using “OrElse" operator.

Or - Operator

This is used to connect two (or more) logical conditions checking like if (condition1 Or condition2).
It will perform the both condition first and second. Even the first is true.
So our execution time is losing.

Here Is the sample : AndAlso.zip (21.2 KB)

Video Demo with example :

Thank you
Balamurugna.S

6 Likes

Thank you .

1 Like

hi @balupad14,

Thank you for sharing. The Tips you share are always Helpful.

One Ask : Do we have a consolidated page somewhere - Which can be accessed to get all the Tips you shared in past.


Mukesh

2 Likes

Hi @mukeshkala,

You can get all my videos in this channel. I will upload the past tips as video…

https://www.youtube.com/channel/UCYK2MGCWoznk_ImVSZa0Kng

Thank you
Balamurugan.S

3 Likes

That would be awesome :slight_smile:

1 Like

@balupad14, very helpful, thanks man.

1 Like

Great Tips! very very helpful