本文介绍了我们有必要将静态类成员显式声明为静态吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你可能会发现它不合逻辑,但我觉得这是一个真正的问题:
有什么理由在C#中我们必须将静态类成员显式地声明为static
如果必须是静态的,为什么不是每个成员都假定是静态的,节省了宝贵的打字时间。
解决方案
You may find it illogical , but i feel its a genuine question:
Is there any reason why in C# we have to explicitly declare static class members as static
if they have to be static why isn't each member assumed to be static, saves precious typing time.
解决方案
这篇关于我们有必要将静态类成员显式声明为静态吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!