S
SAL
Can anyone help me with why, when the mouse is placed over my collection
object, it shows the following exception:
{"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"}S
The code is so simple, which may be the why for the exception but I'm just
not getting it.
public class CCKeyedCollection : KeyedCollection<string, ICollectionItem>
{
protected override string GetKeyForItem(ICollectionItem item)
{
return item.Key();
}
}
public interface ICollectionItem
{
string Key();
}
What's weird is that the code seems to execute fine, no crashing or
anything. I wouldn't know about this exception had I not placed the mouse
pointer over the new collection object after construction.
VS2008 compiling for .NET 2.0 assembly for use in a cohorts program.
Please forgive me if this is just toooo elementary.
Thanks in advance,
S
object, it shows the following exception:
{"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"}S
The code is so simple, which may be the why for the exception but I'm just
not getting it.
public class CCKeyedCollection : KeyedCollection<string, ICollectionItem>
{
protected override string GetKeyForItem(ICollectionItem item)
{
return item.Key();
}
}
public interface ICollectionItem
{
string Key();
}
What's weird is that the code seems to execute fine, no crashing or
anything. I wouldn't know about this exception had I not placed the mouse
pointer over the new collection object after construction.
VS2008 compiling for .NET 2.0 assembly for use in a cohorts program.
Please forgive me if this is just toooo elementary.
Thanks in advance,
S