Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 I'm curious, Why doesn't this work?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

paco
Junior Member

Spain
187 Posts

Posted - 13 June 2001 :  05:37:35  Show Profile
I have a collection and I wonder why the following doesn't work.

If mycollection is Nothing then
... do something

The problem is that when mycollection.count = 0 the above condition is still false. Why?
Could someone explain this a bit?

Regards,

Paco

Trying to learn more ... but can't never get enough

Dan Martin
Average Member

USA
528 Posts

Posted - 13 June 2001 :  13:30:29  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
quote:

I have a collection and I wonder why the following doesn't work.

If mycollection is Nothing then
... do something

The problem is that when mycollection.count = 0 the above condition is still false. Why?
Could someone explain this a bit?

Regards,

Paco

Trying to learn more ... but can't never get enough





I could be wrong (my experience with collections is limited), but the VB Nothing means the object isn't pointed at anything. If myCollection is pointed at an empty collection, it's not equal to Nothing, but myCollection.count does equal 0.

-Dan

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 13 June 2001 :  16:47:21  Show Profile  Visit HuwR's Homepage
quote:

I could be wrong (my experience with collections is limited), but the VB Nothing means the object isn't pointed at anything. If myCollection is pointed at an empty collection, it's not equal to Nothing, but myCollection.count does equal 0.



That would be my interpretation too, nothing means there is no memory allocated for the object, ie it doesn't exist. Which as you say is not the same as an empty object.

Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 14 June 2001 :  03:37:19  Show Profile
Thanks, that makes sense

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07