本文介绍了为什么我们有静态课的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

为什么我们在.Net框架中有静态类?
好像我们不创建staic类的对象?那么,如何说opps概念下的staic类又是紧随其后的呢?正如OOP所说的面向对象编程?

PS:-
我确实了解使用staic类具有以下优点
1)编译器确保不会偶然创建任何实例.
2)可以直接调用Static类的成员,而无需创建任何对象.
3)静态类包含静态成员
4)加载静态类时我们拥有静态类的名称空间或程序也被加载.

请帮帮我.

在此先谢谢您.

Hi All,

Why do we have static class in .Net framework?
As if we dont create object of staic classes? So how do we say that staic class is following under opps conceps? As OOP says Object Oriented programming?

PS:-
I do understand that using staic class have following advantages
1) Compiler ensures that no instance are incidently created.
2) Member of Static class can be called directly no need to create any object.
3) Static class contain static members
4) The namespace or program in which we have static class when that got loaded static class also got loaded.

Please help me.

Thanks in Advance.

推荐答案



这篇关于为什么我们有静态课的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 20:40
查看更多