|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Strange Error when seeking Collection.CountAt 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 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 > 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 > > > > > 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 >> > >> >> >> |
|||||||||||||||||||||||