Hi,
I have a class which inherits from CollectionBase. I set it up long
ago and it works fine. I just ran FxCop on my project and it wants me to
"provide a strongly typed implementation of ICollection.CopyTo" for that
class. OK, I read some documentation and that looks fairly easy. I just add
code that looks something like
void ICollection.CopyTo(Array array, int index)
{
List.CopyTo(array, index);
}
The problem is that when I do this the compiler gives me the message
:\Inetpub\wwwroot\FlexiComplete\Features\FeatureDe finitionCollection.cs(26):
'FlexiVectorDatabase.FeatureDefinitionCollection.I Collection.CopyTo(System.Array,
int)': containing class does not implement interface
'System.Collections.ICollection'
I checked some more documentation and it really looks to me like a class
which inherits CollectionBase should implement ICollection. I tried adding
methods for SynchRoot, IsSynchronized, and Count, but that didn't help.
I am using C#.Net 1.1
Just so you know, I don't understand interfaces and may be missing something
very basic. If so, please let me know.
Any help with this issue would be appreciated.
Thanks!
Ethan Strauss Ph.D.
Bioinformatics Scientist
Promega Corporation
2800 Woods Hollow Rd.
Madison, WI 53711
608-274-4330
800-356-9526
et***********@promega.com