Cags
Well-known member
I recently came across the VB operator AndAlso, up untill that point I had no idea such an operator existed. My question is, what exactly is the difference between And and AndAlso (or should that be And and also AndAlso
). Logically to me in English terms they mean the same thing, so I looked them up in the VB reference guide. AndAlso is described as a "short-circuiting logical conjunction" which as far as I can discern means the second expression is not evaluated if the first is false. Since And is not described as a "short-circuiting logical conjunction" does this mean it will evaluate both expressions before checking if they are both true?
I know that in c# && is a "short-circuiting logical conjunction" and Ive always considered And to be the exact equivalent in VB but it would seem that might not be the case. I guess really Im just looking for confirmation either way.

I know that in c# && is a "short-circuiting logical conjunction" and Ive always considered And to be the exact equivalent in VB but it would seem that might not be the case. I guess really Im just looking for confirmation either way.