Link to home
Start Free TrialLog in
Avatar of ButtonDownBobby
ButtonDownBobby

asked on

How to call base constructor and overload constructor with abstract class and regular class

c# abstract class call base constructor and overload constructor:


    public abstract class AbsAnimationItem
    {
        public AbsAnimationItem(GameObject go)
        {
           ...
        }
    }

 public abstract class AbsAnimationItemRepeatable : AbsAnimationItem
    {
        public AbsAnimationItemRepeatable(GameObject go) : base(go)
        {
            ...
        }
            
        public AbsAnimationItemRepeatable(GameObject go, int numOfRuns) : this(go)
        {
            ...
        }        
    }

public class LightRotation : AbsAnimationItemRepeatable
    {
       public LightRotation(GameObject go) : base(go)
        {
            ...
            SetupRefs();
        }

        public LightRotation(GameObject go, int numOfRuns)[b][u] :this(go) base(go,numOfRuns)[/u][/b]
        {
            ...
        }
}

Open in new window



So, in the last line I want to call base constructor and overload constructor. How do I do this?
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
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