Answers for "c# polymorphism constructor"

C#
0

c# polymorphism constructor

public class A  {
  protected int member;

  public A(int nb)
  { // Base constructor
    member = nb;
  }
}

public class B : A {
	public B(int nb) : base(nb) // Call base constructor
    { // Derived constructor
    }
}
Posted by: Guest on November-09-2020

C# Answers by Framework

Browse Popular Code Answers by Language