Google-Apps
Hauptmenü

Post a Comment On: the urban canuk, eh

"VB.NET Logical Operators are lame"

2 Comments -

1 – 2 of 2
Blogger Unknown said...

A fellow Torontonian and bonified Canuck here. EH!

I'm a veteran programmer coming from the days of C/C++ and I'll add a little light to how C has always provided the && operator...

It's easier to understand the rationale basing on a practical scenario as such...

Take, for example, an object that has a property Name. If you attempt to check the property without evaluating whether or not the object is in fact been instanced (i.e. not nothing), then you will throw exception - yes?

So you write as follows:

If Not MyObject Is Nothing AndAlso MyObject.Name = "hello" Then

Before the AndAlso you would have nest the conditions.

Simple. ;)

Thanks! Good day! Eh!

ps. living is Houston - missing snow ha ha!

6:00 PM

Blogger bryan said...

Thanks Adam,

btw -- had a good friend living in Arizona refer to their 110F+ summers as our 10F winters -- you just don't go outside. Not having to deal with snow is nice.

10:02 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot