Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
根据 C# 编码约定 public field 应该谨慎使用:
public field
// A public field, these should be used sparingly public bool IsValid;
为什么?我认为因为:
但是,在某些情况下您需要将字段设置为 @VGR 说:
public const string foo = "";
According to the C# coding conventions public field should be used sparingly:
Why? I think because of:
However, there is a case when you need to have field as @VGR said:
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
根据 C# 编码约定
public field
应该谨慎使用:为什么?我认为因为:
但是,在某些情况下您需要将字段设置为 @VGR 说:
According to the C# coding conventions
public field
should be used sparingly:Why? I think because of:
However, there is a case when you need to have field as @VGR said: