I need to know something about inheritance in C #. I have a class shown below:
Class BaseClass { public void X() {
Now I want to create another class (ChildClass) that was derived from BaseClass. The problem is that somehow I want to override the Y () function in ChildClass, and when the base.X () function is called, I want the X () function to use the overridden Y () function in ChildClass.
Someone suggested I use the "delegate" keyword for the Y function when overriding. But I'm not quite sure if this will work.
Is it possible? Any suggestions?
source share