N
Noah Coad [MVP .NET/C#]
How do you make a member of a class mandatory to override with a _new_
definition? For example, when inheriting from
System.Collections.CollectionBase, you are required to implement certain
methods, such as public void Add(MyClass c).
How can I enforce the same behavior (of requiring to implement a member with
a new return type in an inherited class) in the master class (similar to the
CollectionBase)?
I have a class called "LinearNavigator" which is a generic manager for
Forward and Back operations (like IE) that is inherited to provide
interaction with specific types (like inheriting CollectionBase).
LinearNavigator has methods Next & Back which I want to make mandatory to
implement and a method called Clear that should not be
overridden/re-implemented.
Thanks!
definition? For example, when inheriting from
System.Collections.CollectionBase, you are required to implement certain
methods, such as public void Add(MyClass c).
How can I enforce the same behavior (of requiring to implement a member with
a new return type in an inherited class) in the master class (similar to the
CollectionBase)?
I have a class called "LinearNavigator" which is a generic manager for
Forward and Back operations (like IE) that is inherited to provide
interaction with specific types (like inheriting CollectionBase).
LinearNavigator has methods Next & Back which I want to make mandatory to
implement and a method called Clear that should not be
overridden/re-implemented.
Thanks!