C
Chazza
I would like to override a method from an inherited class, but the new
method has a different signature to the inherited class. Example:
class A {
private void Init() {
// code
}
}
class B : A {
private void Init(string text) {
base.Init();
// do something with "text"
}
}
I don't want to see class A's version of Init(). Any instance of class B
should only see Init(text). I know this is possible in Delphi using the
reintroduce modifier, but I couldn't find a way in C#. The "override" and
"new" modifiers didn't help either.
method has a different signature to the inherited class. Example:
class A {
private void Init() {
// code
}
}
class B : A {
private void Init(string text) {
base.Init();
// do something with "text"
}
}
I don't want to see class A's version of Init(). Any instance of class B
should only see Init(text). I know this is possible in Delphi using the
reintroduce modifier, but I couldn't find a way in C#. The "override" and
"new" modifiers didn't help either.