静态类和非静态类的主要区别:
主要区别在于静态类不能实例化,静态类编译器能够执行检查确保不是偶然的添加实例成员,C#编译器会自动把它标记为sealed,静态类中不能创建非静态的方法,即静态方法中只能创建静态方法,但在非静态类中可以调用静态方法。
顶一下

(0)
0%
踩一下

(0)
0%
- 相关评论
- 我要评论
-