A
aa7im
I am attempting to create a base collection that I can use to derive
strongly typed collection. My base collection class will derive from
CollectionBase and I want my typed collections to be forced to
implement certain methods:
public abstract class MyCollectionBase: CollectionBase
{
public void Sort() {.... SORT IMPLEMENTATION }
public void Filter() {...> FILTER IMPLEMENTATION }
}
Sort and Filter can be done generically so I am including those in my
base class design. Now I want to force my derived classes to implement
the strongly typed Add(typedObject object), Remove(), this[int index]
members....
I am not sure how to make the derived classes be forced to implement
the interface...
public abstract int Add(...... DON'T KNOW WHAT TO PUT HERE .....)
{
return List.Add(...);
}
When I define the methods it makes me define the types for the
parameters and then I can't implement a typed Add(), this[] methods in
my derived classes.... Interfaces seem to have the same issue because
I have to define the "types" of the methods, etc..
I hope this all makes sense to somebody...
Thanks,
Josh
strongly typed collection. My base collection class will derive from
CollectionBase and I want my typed collections to be forced to
implement certain methods:
public abstract class MyCollectionBase: CollectionBase
{
public void Sort() {.... SORT IMPLEMENTATION }
public void Filter() {...> FILTER IMPLEMENTATION }
}
Sort and Filter can be done generically so I am including those in my
base class design. Now I want to force my derived classes to implement
the strongly typed Add(typedObject object), Remove(), this[int index]
members....
I am not sure how to make the derived classes be forced to implement
the interface...
public abstract int Add(...... DON'T KNOW WHAT TO PUT HERE .....)
{
return List.Add(...);
}
When I define the methods it makes me define the types for the
parameters and then I can't implement a typed Add(), this[] methods in
my derived classes.... Interfaces seem to have the same issue because
I have to define the "types" of the methods, etc..
I hope this all makes sense to somebody...
Thanks,
Josh