N
nooboy
Confused about this concept. If I define some collection class and inherit
IList, I get an error if I don't implement the interface methods. This
makes sense.
But if I inherit from CollectionBase, I don't get this error, yet the
methods still don't seem to be implemented. For example, this code gives a
compile error.
class TestColl : IList
{
}
because, for one, it doesn't implement Add(...)
But this one does not give an error, even though the source for
CollectionBase shows that it does not implement Add(...) either.
class TestColl : CollectionBase, IList
{
}
What concept am I missing here?
IList, I get an error if I don't implement the interface methods. This
makes sense.
But if I inherit from CollectionBase, I don't get this error, yet the
methods still don't seem to be implemented. For example, this code gives a
compile error.
class TestColl : IList
{
}
because, for one, it doesn't implement Add(...)
But this one does not give an error, even though the source for
CollectionBase shows that it does not implement Add(...) either.
class TestColl : CollectionBase, IList
{
}
What concept am I missing here?