"(O)enone" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Mr. Arnold wrote:
>>> 1. Turn Option Strict On in your source file
>
>> There was no Option Strict prior to .Net 2005. With Option Strict
>> off, which is the default, this is really not applicable.
>
> There definitely was in VS2003, and I'm pretty sure it was there in VS2002
> too. Switching it on can save you from all sorts of errors that you
> otherwise wouldn't spot until your code happens to hit a specific set of
> conditions at run-time. And it might be your users that hit those
> conditions before you do.
I'll take your word for it. I never had to us it.
>
> Personally I'd never write any code with Option Strict switched off. Up to
> you though.
I'll keep it mind, the next time on a VB.net project.
>
>> I appreciate your comments and I'll be aware of this, if I need Option
>> Strict ever enabled. I guess this has to be the reason IsNothing()
>> disappeared out of VB.NET 2.0
>
> IsNothing is still there in VB.NET 2.0, in the
> Microsoft.VisualBasic.Information namespace. (You'll obviously need a
> reference to Microsoft.VisualBasic before you can use it, though). To me,
> the syntax "If IsNothing(variable) Then" is much clumsier than "Is
> variable Is Nothing Then" but again it's up to you.
I have used the Microsoft.VisualBasic namespace, but not for this.
IsNothing() or Is Nothing as long as they work is the bottom line. I include
the <> in there as well as long Option Strict is off.
I came from a VB 6 background but have spent most of my .NET development in
C#, no Options.