当我们去静态课 [英] When we go for static class

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

问题描述

大家好,



任何人都可以通过实时示例简要介绍静态课程。



当我们应该使用静态课程时。



任何人都可以帮我吗?



谢谢,

Hi Everyone,

Can any one give brief description about Static class with real time example.

When we should use static class.

Can any one help me on this?

Thanks,

推荐答案

请从MSDN文档开始:

静态类设计 [ ^ ]

静态类和静态类成员(C#编程指南) [ ^ ]
Please, start with MSDN documentation:
Static Class Design[^]
Static Classes and Static Class Members (C# Programming Guide)[^]


Quote:

使用静态类作为与partic无关的方法的组织单位对象。此外,静态类可以使您的实现更简单,更快,因为您不必创建对象以调用其方法。

Use a static class as a unit of organization for methods not associated with particular objects. Also, a static class can make your implementation simpler and faster because you do not have to create an object in order to call its methods.





您可能想要通过这个帖子。好读:



http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp [ ^ ]


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆