Home All Groups Group Topic Archive Search About

Strange Error when seeking Collection.Count

Author
24 May 2006 10:53 PM
Jav
At Design time, whenever I look for a value (In intellisense or in the Watch
window) for .Count of any of my generic based collections, I see the
following:

{"The generic type 'System.Collections.ObjectModel.Collection`1' was used
with the wrong number of generic arguments in assembly 'mscorlib,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.":"System.Collections.ObjectModel.Collection`1"}

No error is generated at run time, and .Count provides the correct value. Am
I doing something wrong when creating the collection?
TIA
Jav

Author
25 May 2006 12:19 AM
Scott M.
How can you be looking for the count of a collection at design-time?
Collections don't get populated until run-time.


Show quote
"Jav" <J**@discussions.microsoft.com> wrote in message
news:9AE89D59-EDE5-46A2-B2CD-F3F274899486@microsoft.com...
> At Design time, whenever I look for a value (In intellisense or in the
> Watch
> window) for .Count of any of my generic based collections, I see the
> following:
>
> {"The generic type 'System.Collections.ObjectModel.Collection`1' was used
> with the wrong number of generic arguments in assembly 'mscorlib,
> Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089'.":"System.Collections.ObjectModel.Collection`1"}
>
> No error is generated at run time, and .Count provides the correct value.
> Am
> I doing something wrong when creating the collection?
> TIA
> Jav
>
Author
25 May 2006 2:44 PM
Jav
Scott,
I am not "looking for a count".  When I move the mouse pointer on "count", I
see the error messge.  I am not expecting to see a result, but I am also not
expecting to see an error message.


Show quote
"Scott M." wrote:

> How can you be looking for the count of a collection at design-time?
> Collections don't get populated until run-time.
>
>
> "Jav" <J**@discussions.microsoft.com> wrote in message
> news:9AE89D59-EDE5-46A2-B2CD-F3F274899486@microsoft.com...
> > At Design time, whenever I look for a value (In intellisense or in the
> > Watch
> > window) for .Count of any of my generic based collections, I see the
> > following:
> >
> > {"The generic type 'System.Collections.ObjectModel.Collection`1' was used
> > with the wrong number of generic arguments in assembly 'mscorlib,
> > Version=2.0.0.0, Culture=neutral,
> > PublicKeyToken=b77a5c561934e089'.":"System.Collections.ObjectModel.Collection`1"}
> >
> > No error is generated at run time, and .Count provides the correct value.
> > Am
> > I doing something wrong when creating the collection?
> > TIA
> > Jav
> >
>
>
>
Author
25 May 2006 8:47 PM
Scott M.
Why *wouldn't* you be expecting an error message?  If the collection isn't
instatiated and/or populated yet, there is nothing to see.


Show quote
"Jav" <J**@discussions.microsoft.com> wrote in message
news:8E3FB444-53F2-4916-9B07-39D546AC8869@microsoft.com...
> Scott,
> I am not "looking for a count".  When I move the mouse pointer on "count",
> I
> see the error messge.  I am not expecting to see a result, but I am also
> not
> expecting to see an error message.
>
>
> "Scott M." wrote:
>
>> How can you be looking for the count of a collection at design-time?
>> Collections don't get populated until run-time.
>>
>>
>> "Jav" <J**@discussions.microsoft.com> wrote in message
>> news:9AE89D59-EDE5-46A2-B2CD-F3F274899486@microsoft.com...
>> > At Design time, whenever I look for a value (In intellisense or in the
>> > Watch
>> > window) for .Count of any of my generic based collections, I see the
>> > following:
>> >
>> > {"The generic type 'System.Collections.ObjectModel.Collection`1' was
>> > used
>> > with the wrong number of generic arguments in assembly 'mscorlib,
>> > Version=2.0.0.0, Culture=neutral,
>> > PublicKeyToken=b77a5c561934e089'.":"System.Collections.ObjectModel.Collection`1"}
>> >
>> > No error is generated at run time, and .Count provides the correct
>> > value.
>> > Am
>> > I doing something wrong when creating the collection?
>> > TIA
>> > Jav
>> >
>>
>>
>>

AddThis Social Bookmark Button