[thelist] ASP.NET Weird If-Then thing with Is Nothing

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Fri Aug 12 10:15:29 CDT 2005


   But I already gave him an answer below... why are you speculating on this?

 From: VOLKAN ÖZÇELIK volkan.ozcelik at gmail.com

There is no such thing as Nothing on the C# side, since the VB.Net
code has to be converted to CLR code it's quite probable that MS
should have removed Nothing from their list of keywords as well.

Again mentioning that I have not written any single line of VB.Net
code but I know VBScript well enough; I think Null and Nothing might
have been merged into a single thing : Null.

So I guess there is no such thing "Nothing" in VB.Net any more. and
Null refers to both values that can be depicted as Nothing or Null.

Just my intelligent guess again. Haven't done any rtfm.

Cheers,
Volkan.

On 8/11/05, Peter Brunone (EasyListBox.com) wrote:
> 
> Heh... I didn't realize that "sdr" was your naming convention for "SqlDataReader" :)
> 
> If sdrDocs("Address2").Equals(System.DBNull.Value) Then
> 
> should do it...
> 
> From: "Casey" aspnet at thecrookstons.com
> 
> ----- Original Message -----
> From:
> 
> > I don't know about VB.NET, but in VBScript Nothing and Null are two
> > different things. Have you tried something along the following lines:
> >
> > strAddress2 = sdrDocs("Address2")
> >
> > bIsBadValue = IsNull(strAddress2)
> 
> I think isNull became null is VB.NET, but what you are saying makes sense.
> How would I distuniguish between Null and Nothing in VB.NET?
> 


More information about the thelist mailing list