constructor c# base class code example

Example 1: c# call base constructor

public class MyExceptionClass : Exception
{
    public MyExceptionClass(string message, string extrainfo) : base(message)
    {
        //other stuff here
    }
}

Example 2: Base class c#

class Motore:Veicoli
    { 
        public bool Cavalletto { get; set; }
       
        public Motore (String marca, String modello, int cilindrata, bool cavalletto): base (marca,modello,cilindrata)
        { 
            this.Cavalletto = cavalletto;
        }

        override
        public void Accelera(double velocitacorrente )
        {
            this.VelocitaCorrente += velocitacorrente;
        }
    }