docs icon indicating copy to clipboard operation
docs copied to clipboard

Calling base class method from derived class error

Open Folivi95 opened this issue 7 years ago • 1 comments

ivedClass B = new DerivedClass(); B.DoWork(); // Calls the new method.

BaseClass A = (BaseClass)B; A.DoWork(); // Calls the old method.

and the code snippet below are in conflict... Kindly resolve which is correct.

DerivedClass B = new DerivedClass(); B.DoWork(); // Calls the new method.

BaseClass A = (BaseClass)B; A.DoWork(); // Also calls the new method.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Folivi95 avatar Feb 23 '19 11:02 Folivi95

Okay.. Thanks

Folivi95 avatar Feb 23 '19 17:02 Folivi95