静态类的继承 [英] Inheritance of a Static class
本文介绍了静态类的继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么静态类是密封类
推荐答案
静态类没有实例方法,并且其所有方法都是静态的,并且对任何有权访问的人都是可见的班级.
因此,继承的概念和通用方法功能根本就不会出现.A static class does not have instance methods and all its methods are static and visible to anyone who has access to the class.
SO the concept of inheritance and common method functionality does not arise at all.
因为静态类仅在内存中存在一次,因此继承它不会产生必要的实例表决定使用哪个副本的框架.Because a static class only exists one time in memory, and inheirting from it won''t generate the instance table necessary for the framework to decide which copy to use.
这篇关于静态类的继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文