Passing value to base class constructor c#.


“base” keyword is used to call and pass the value to the base class parameterised constructor in c#.
Base class constructor is called before the child class constructor.

class Numbers
{
    public Numbers(int a)
    {
        //code here
    }
}

class Addition : Numbers
{
    public Addition(int x)
        : base(x)
    {

    }
}