Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag for United States of America

asked on

abstract class C#

i have two classes, a base class (A) and a inherited class B. A has a protect function that B can call.
Can Class B have a function with the same name as "SetDefault" with different parameter list,  which say, other public class C can call.
in my example, can I rename someFunction to SetDefault, they have a different parameter list, one has a parameter and other one doesn't. I'm not trying to override function here, just trying to see if it is legal to do in C#.

public abstract class A{
   protected void SetDefault(SomeObject o){
      //do some work
  }
}

public class B : A {
   private SomeObject a;
   public someFunction() {  
       this.SetDefault(a);
   }
}
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial