开发者

Is a C# field private by default? [duplicate]

开发者 https://www.devze.com 2023-03-07 14:21 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate:开发者_如何转开发
This question already has answers here: Closed 11 years ago.

Possible Duplicate:开发者_如何转开发

Default visibility for C# classes and members (fields, methods, etc)?

Is a C# field by default private? In general is there a guide (possibly a msdn guide) that specifies these things? When you ommit a modifier, which one is used? Thanks indeed.


Yes, it is private by default. More discussion around it in this and this question.


All type members are private by default.

0

精彩评论

暂无评论...
验证码 换一张
取 消