PC Review


Reply
Thread Tools Rate Thread

determine number in a collection

 
 
=?Utf-8?B?c21rMjM=?=
Guest
Posts: n/a
 
      29th Jun 2005
How do I determine whether a collection, in this case a class, has members or
is empty?

Thanks!!
--
sam
 
Reply With Quote
 
 
 
 
Brendan Reynolds
Guest
Posts: n/a
 
      29th Jun 2005
Collections have a Count property.

--
Brendan Reynolds (MVP)


"smk23" <(E-Mail Removed)> wrote in message
news:08E543F2-F0E8-4BF6-8060-(E-Mail Removed)...
> How do I determine whether a collection, in this case a class, has members
> or
> is empty?
>
> Thanks!!
> --
> sam



 
Reply With Quote
 
=?Utf-8?B?c21rMjM=?=
Guest
Posts: n/a
 
      29th Jun 2005
I tried that but it doesn't seem to recognize "count". When I look at which
properties are available, I only see the user-defined properties in that
class. Is a class a special kind of collection?
--
sam


"Brendan Reynolds" wrote:

> Collections have a Count property.
>
> --
> Brendan Reynolds (MVP)
>
>
> "smk23" <(E-Mail Removed)> wrote in message
> news:08E543F2-F0E8-4BF6-8060-(E-Mail Removed)...
> > How do I determine whether a collection, in this case a class, has members
> > or
> > is empty?
> >
> > Thanks!!
> > --
> > sam

>
>
>

 
Reply With Quote
 
Brendan Reynolds
Guest
Posts: n/a
 
      29th Jun 2005
No, a class is not a special kind of collection. On the contrary, you could
say that a collection is a special kind of class.

You're probably going to have to describe this object in rather more detail
before anyone can help you. Remember, all we know is what you've told us.
You told us it was a collection. Collections have a Count property. If your
object doesn't have a Count property, it's not a collection. What it is, I
can't tell you. Only you can answer that.

--
Brendan Reynolds (MVP)

"smk23" <(E-Mail Removed)> wrote in message
news:A5FC630A-32B9-44B7-A5EA-(E-Mail Removed)...
>I tried that but it doesn't seem to recognize "count". When I look at which
> properties are available, I only see the user-defined properties in that
> class. Is a class a special kind of collection?
> --
> sam
>
>
> "Brendan Reynolds" wrote:
>
>> Collections have a Count property.
>>
>> --
>> Brendan Reynolds (MVP)
>>
>>
>> "smk23" <(E-Mail Removed)> wrote in message
>> news:08E543F2-F0E8-4BF6-8060-(E-Mail Removed)...
>> > How do I determine whether a collection, in this case a class, has
>> > members
>> > or
>> > is empty?
>> >
>> > Thanks!!
>> > --
>> > sam

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?c21rMjM=?=
Guest
Posts: n/a
 
      29th Jun 2005
Brendan: Thanks for your incredible patience. I think it just uncovers the
fact that I don't actually know what I'm doing. I have just enough code from
someone who did that I keep getting myself in trouble. In any case, I solved
the issue by testing for "If not x Is Nothing Then" So I'm good for now.
Thank you!!
--
sam


"Brendan Reynolds" wrote:

> No, a class is not a special kind of collection. On the contrary, you could
> say that a collection is a special kind of class.
>
> You're probably going to have to describe this object in rather more detail
> before anyone can help you. Remember, all we know is what you've told us.
> You told us it was a collection. Collections have a Count property. If your
> object doesn't have a Count property, it's not a collection. What it is, I
> can't tell you. Only you can answer that.
>
> --
> Brendan Reynolds (MVP)
>
> "smk23" <(E-Mail Removed)> wrote in message
> news:A5FC630A-32B9-44B7-A5EA-(E-Mail Removed)...
> >I tried that but it doesn't seem to recognize "count". When I look at which
> > properties are available, I only see the user-defined properties in that
> > class. Is a class a special kind of collection?
> > --
> > sam
> >
> >
> > "Brendan Reynolds" wrote:
> >
> >> Collections have a Count property.
> >>
> >> --
> >> Brendan Reynolds (MVP)
> >>
> >>
> >> "smk23" <(E-Mail Removed)> wrote in message
> >> news:08E543F2-F0E8-4BF6-8060-(E-Mail Removed)...
> >> > How do I determine whether a collection, in this case a class, has
> >> > members
> >> > or
> >> > is empty?
> >> >
> >> > Thanks!!
> >> > --
> >> > sam
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
determine object's collection Jure Bogataj Microsoft C# .NET 1 19th Nov 2007 11:32 AM
Determine Controls Index in a collection =?Utf-8?B?QnJhZA==?= Microsoft Access Form Coding 2 19th Jul 2007 03:31 AM
Statically determine type of Collection cody Microsoft C# .NET 2 29th Jul 2006 01:47 PM
Determine if an item is in a Collection =?Utf-8?B?am1obWFpbmU=?= Microsoft VB .NET 3 19th Jul 2005 07:37 AM
Determine Type of Items in a collection Bud J via DotNetMonster.com Microsoft Dot NET Framework Forms 1 23rd Jun 2005 08:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 PM.