Sunday, September 18, 2011

[Research] Visual Basic - The Object Class


There is a class called X that contains the following overridable methods:
Run()
Walk()
Hide()
There is a class Y that inherits from class X. Is Y able to override the Run, Walk & Hide methods in X?
Yes, Y can override the methods from class X, since X is the parent. X can call it's own functions even if Y overrides them, but Y if it overrides X's methods cannot access X's original methods only the newly written overriding one.

No comments:

Post a Comment