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

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Fri Aug 12 11:21:04 CDT 2005


Is thinking over a concept and sharing your thoughts a bad habit?
Or is giving two different answers on a question bad thing?

imho, my comment revealed issues that I (and possibly some others) do
not know on the Null, Nothning, DBNull, C#, VB.Net spectrum.

Don't get met wrong, I didn't aim to boast or anything.
I just tried to look at things from a questioning point of view.

Again don't get me wrong I don't aim to offend anyone, and excuse me
if my non-native English is misunderstood in any means.

Cheers,
Volkan.

On 8/12/05, Peter Brunone (EasyListBox.com) <peter at easylistbox.com> wrote:
> 
>   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?
> >
> --
> 
> * * 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