I have a some class, which contains three fields:
protected bool _isRunning = false;
protected readonly ParameterCollection _parameters = null;
protected readonly ParameterCollection _defaultParameters = null;
The assembly it is in is marked as CLS-compliant (it is needed), and Visual Studio 2010 says that those three fields' identifiers are not CLS-compliant. What is wrong with them?
P.S.: ParameterCollection is a class, derived from KeyedCollection, if it is important information.
Here is the answer from Microsoft, from Name <membername> is not CLS-compliant:
To correct this error
If you have control over the source code, change the member name so that it does not begin with an underscore.
If you require that the member name remain unchanged, remove the CLSCompliantAttribute from its definition or mark it as . You can still mark the assembly as <CLSCompliant(True)>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With