D
Dave Veeneman
I'm using inheritance more than I used to, and I find myself calling a lot
of base class methods. I generally call a base method from a dreived class
like this:
this.MyMethod();
I'm finding it somewhat confusing when I look at the code later, because I
expect to find a method called MyMethod() in the derived class.
I think C# would let me call a base class method from a derived class like
this:
base.MyMethod();
This would make it clear that the method being called is a base class
method. From the standpoint of clarity, I like it.
But, are there other reasons I couldn't call a base class method like that?
Reasons why I shouldn't? Thanks.
Dave Veeneman
Foresight systems
of base class methods. I generally call a base method from a dreived class
like this:
this.MyMethod();
I'm finding it somewhat confusing when I look at the code later, because I
expect to find a method called MyMethod() in the derived class.
I think C# would let me call a base class method from a derived class like
this:
base.MyMethod();
This would make it clear that the method being called is a base class
method. From the standpoint of clarity, I like it.
But, are there other reasons I couldn't call a base class method like that?
Reasons why I shouldn't? Thanks.
Dave Veeneman
Foresight systems