Latest

random

C# - Can we define Abstract Class as a Static?

Can we define Abstract Class as a Static?

 
No, we can not define abstract class as static.

Why?

Because abstract classes contain abstract methods that should be implemented in derived classes. "static" keyword in class definition means that all methods in the class are static too. But static methods cannot be inherited or overridden, and that is why they can't be abstract.

No comments:

All Rights Reserved by Etechpulse © 2015 - 2016
Powered By Blogger

Contact Form

Name

Email *

Message *

Powered by Blogger.