Interviews - C# Corner

Amit Kumar
How can we access base class constructor from a derived class constructor in C#?
By Amit Kumar in .NET onSep 26 2019
  • Ravi Patel
    Oct, 2019 3

    The base keyword is used to access members of the base class from within a derived class

    A base class access is permitted only in a constructor, an instance method, or an instance property accessor.

    It is an error to use the base keyword from within a static method.

    • 1
  • Arun Kumar Tiwari
    Oct, 2019 21

    It is used to access members of the class from within derived class, Base class access only in constructor, instance method and instance property access.

    • 0
  • Arun Kumar Tiwari
    Oct, 2019 21

    It is used to access members of the class from within derived class, Base class access only in constructor, instance method and instance property access.

    • 0
  • Ishoo Anyal
    Oct, 2019 9

    YOu can use base() or if it is a parameterize constructor then you can do base(var) and so on. Base class constructor is called first when creating object of child class, it’s called constructor chaining

    • 0
  • Imran Shaikh
    Oct, 2019 9

    the base keyword is used to access the base class constructor

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS