Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I inherit static classes?

I have several classes that do not really need any state. From the organizational point of view, I would like to put them into hierarchy.

But it seems I can't declare inheritance for static classes.

Something like that:

public static class Base
{
}

public static class Inherited : Base
{
}

will not work.

Why have the designers of the language closed that possibility?

like image 607
User Avatar asked Apr 21 '09 19:04

User


1 Answers

Hmmm... would it be much different if you just had non-static classes filled with static methods..?

like image 154
CookieOfFortune Avatar answered Sep 28 '22 17:09

CookieOfFortune