This question already has answers here:
Why is this name with an underscore not CLS Compliant?

(8 个回答)


8年前关闭。




我有一个类,其中包含三个字段:
protected bool _isRunning = false;

protected readonly ParameterCollection _parameters = null;

protected readonly ParameterCollection _defaultParameters = null;

它所在的程序集被标记为符合 CLS(需要),并且 Visual Studio 2010 表示这三个字段的标识符不符合 CLS。他们怎么了?

P.S.:ParameterCollection 是一个类,派生自 KeyedCollection,如果是重要信息的话。

最佳答案

这是微软的答案,来自 Name <membername> is not CLS-compliant :

关于c# - 为什么我的标识符标记为不符合 CLS?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7555906/

10-15 23:17