Re: And/Or vs AndAlso/OrElse
Most people don't use it because it's an addition to VB first introduced in .NET.... IE, it wasn't available in VB6-.
Tg
Re: And/Or vs AndAlso/OrElse
Quote:
Originally Posted by techgnome
Most people don't use it because it's an addition to VB first introduced in .NET.... IE, it wasn't available in VB6-.
Tg
Quite right. I had intended that that be implied by my saying that many don't understand the difference. I guess the truth of the matter is that many actually don't know that the alternative exists. No doubt that is what you were implying. :) I guess old habits do die hard and it would be difficult to break a habit like that without a compelling reason, even if you were aware of the alternative.
Re: And/Or vs AndAlso/OrElse
I didn't know those tests existed, thanks!
Re: And/Or vs AndAlso/OrElse
AndAlso is great for checking if a object is Nothing before doing a check against a value in the object, it's what I use it for most of the time anyways..
If Not (Obj Is Nothing) AndAlso (Obj.Value = "Whatever") Then
Hinder
Re: And/Or vs AndAlso/OrElse
didn't Java actually 'introduce' that concept...of Short Circuiting I mean? It's actually been in OOP for quite some time but .net just exposed it to the Microsoft users...correct me if I'm wrong.
Re: And/Or vs AndAlso/OrElse
No.... C has had it for a long time.... as did Pascal.... and other languages.... short circuiting is nothing new.....
Tg
Re: And/Or vs AndAlso/OrElse