常数Vs静态Vs只读Vs静态只读 [英] Constant Vs static Vs Read-only Vs static Read-only

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

问题描述

请你解释一下我在C#中这些东西的确切区别是什么?我对这些东西感到困惑

can you please explain me what is the exact difference between these things in C# i have confusing with these things

推荐答案

文档对于这些事情,请参阅:例如:修饰符(C#参考) [< a href =http://msdn.microsoft.com/en-us/library/6tcf2h8w.aspxtarget =_ blanktitle =New Window> ^ ]。
There is the documentation for such things, see, for instance: "Modifiers (C# Reference)"[^].


请参阅 const-vs-readonly.aspx [ ^ ]

const,_static_and_readonly [ ^ ]



static 关键字意味着它''在类级别而不是该类实例的属性。



干杯,

Edo
See const-vs-readonly.aspx[^]
and const,_static_and_readonly[^]

The static keyword means that it''s on the class level instead of being a property of an instance of that class.

Cheers,
Edo


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

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