I understand what static classes and private classes are, and I regularly use extension methods, I'm just wondering: does anyone know why static classes are sealed in C #?
I looked at the MSDN and the C # language specification, but it never says why they are sealed.
Why can't we inherit from static classes and redefine static members, etc.?
Edit:
I appreciate your answers, but you still talk about what a static class is. I know why I cannot override its methods. But I ask, why did they do this?
Are vtables really expensive? Why is langauge design so static classes are literally static? Is it just for tradition? Is there another advantage that I do not see?
(I have a suspicious suspicion that I fundamentally misunderstand the point of static classes.)
source share