Abstract classes are defined as classes using the modifier "abstract". When we want a class to be base class and we don't want to instantiate we use abstract classes. Many a times abstract classes are either partially implemented or not at all implemented.
An abstract class can contain either abstract methods or non abstract methods. Abstract members do not have any implementation in the abstract class, but the same has to be provided in its derived class.
An abstract class cannot be sealed class. We can have abstract methods only in abstract classes. We should use same access modifier for an abstract method in both base class and derived class to avoid compilation errors.
An abstract method cannot have virtual as it is implicitly virtual.
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
An abstract class cannot be a sealed class because the sealed modifier prevents a class from being inherited and the abstract modifier requi...
-
"Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/narendravenkata/React-Demo.git HE...
-
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
No comments:
Post a Comment