Hello,
"new" modifier explicitly hide a member inherited from a base class in C#..
Is there any alternative in C++ which can be used like this..
as shown below..
public class MyBaseC
{
public int x;
public void Invoke() {}
}
public class MyBaseC
{
public int x;
public void Invoke() {}
}
To copy to clipboard, switch view to plain text mode
Declaring a member with the name
Invoke
in a derived class will hide the method
Invoke
in the base class, that is:
public class MyDerivedC : MyBaseC
{
new public void Invoke() {}
}
public class MyDerivedC : MyBaseC
{
new public void Invoke() {}
}
To copy to clipboard, switch view to plain text mode
here member function Invoke() in class MyDerivedC is hidden from the base MyBaseC...
-->> how can i implement this similar thing in C++...
Regards,
Kunal nandi.
Bookmarks