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

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Fri Aug 12 01:36:39 CDT 2005


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) <peter at 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?
> 
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


More information about the thelist mailing list