This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
Rajesh Singh
abstract methods cannot declare a body, abstract method cannot have virtual, the return type is missing in C method.
Abstract class can create abstract and non abstract method but we can not create virtual method in abstract class. So declare class is not correct.
Abstract Method does not have body
Ans: Method without implementation is called abstract method. It is declared with abstract key word. Please see inline comment.abstract class A {public abstract void Disp();//correctpublic abstract void B() //wrong {}public absract virtual C() //wrong {}}