4
Reply

This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

Rajesh Singh

Rajesh Singh

9y
1.3k
0
Reply

    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 {}}