Syntax to inherit a class in C#

Specify the syntax which is be used to inherit from a class in C#?

E

Expert

Verified

Whenever a class is derived from the other class, then all members of the base class become the members of the derived class after it inherits the class. Access modifier are used while accessing members of the base class specifing the access status of the base class members inside derived class.

The syntax used to inherit a class from another class in C# is as follows:

class MyNewClass : MyBaseclass

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.