标识符应具有正确的后缀 (fxcop)
我正在编写的集合出现此错误,但 fxcop 警告我在其后面添加集合后缀。 为什么?
没有 .NET 集合可以做到这一点,对吧? 即 List
、LinkedList
等。
I got this error for a collection I am writing, but fxcop warned me to suffix it with collection. Why?
No .NET collection does this, right? i.e. List<T>
, LinkedList<T>
, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我忽略的 FxCop 规则,原因与您所描述的几乎完全相同。 我也觉得在大多数情况下它没有增加任何价值。 我通常在我的所有项目中将其关闭。
第二个原因是,如果遵循规则,它会产生一些非常奇怪的类名(特别是与 Tree 组合时)
This is one FxCop rule I ignore for pretty much the exact reason you describe. also I feel that in the majority of cases it adds no value. I usually turn it off in all of my projects.
The second reason is that if you follow the rule, it produces some really odd class names (especially when combined with Tree)
...在其他人中。
...amongst others.