CLI and calling the base method from the derived method

  • Thread starter Thread starter DaTurk
  • Start date Start date
D

DaTurk

Just a syntax question, how do I call the parent's method I've
overridden from the child in syntax. I notice there is no "base"
Keyword. Thanks.
 
Hi,
Just a syntax question, how do I call the parent's method I've
overridden from the child in syntax. I notice there is no "base"
Keyword. Thanks.

Prepend the class name like so:

baseClassName::TheMethod(a, b, c);
 
DaTurk said:
Just a syntax question, how do I call the parent's method I've
overridden from the child in syntax. I notice there is no "base"
Keyword. Thanks.

Use the name of the base class. In C++, multiple inheritance is allowed, so
the syntax has to account for that, even for single inheritance classes like
CLI ref classes. However, there is a special Microsoft __super keyword
which searches all base classes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top