R
relient
This is rediculous. It is said when you override a method in a derived
class that's implemented in the base class, you "override the base
class methods" implementation, correct? but in my test,
base.SomeMethod() still prints out it's *own* implimentation - that's
tottally different from the deriveds overrided method. I don't get it.
Really, What's the difference betwen this.SomeMethod() and
base.SomeMethod()? more precisely, is *this* and *base* two different
things, meaning they both reside at a different memory address and each
have their *own* seperate members, again meaning; different address
space? To me it looks like a derived class has two seperate members for
each inherited member in the basde class, one in the derived class
which can be accessed with *this* and the other completely unrelated
member, which can be accessed with *base*. I hope someone understands
my frustration and helps me untangle this confusion.
Thanks to all who reply.
class that's implemented in the base class, you "override the base
class methods" implementation, correct? but in my test,
base.SomeMethod() still prints out it's *own* implimentation - that's
tottally different from the deriveds overrided method. I don't get it.
Really, What's the difference betwen this.SomeMethod() and
base.SomeMethod()? more precisely, is *this* and *base* two different
things, meaning they both reside at a different memory address and each
have their *own* seperate members, again meaning; different address
space? To me it looks like a derived class has two seperate members for
each inherited member in the basde class, one in the derived class
which can be accessed with *this* and the other completely unrelated
member, which can be accessed with *base*. I hope someone understands
my frustration and helps me untangle this confusion.
Thanks to all who reply.