As the author of the OSS library, I have always tried to make my CLS material compatible. But MS does not make it easy. They often put you in a catch-22 situation, such as:
- You cannot have a protected variable that differs only in the case of a public one.
- You cannot have protected or public variables starting with an underscore or "m_".
- If you want to make a class truly extensible, you often need to have protected variables that match public properties. Your least ugly way out is to add a suffix to a variable, such as “Var” or “Value”. This is unpleasant and unacceptable to me. I like the clean code.
I do not know a single .NET language that does not support variables starting with an underscore, and I used them in many places where the variable should be visible to subclasses.
I'm tired of warnings, and plan to disable assembly level CLS compliance on my 30+ C # books.
Are there any actual issues with disabling CLS library compliance? Any real problems with this?
Microsoft has issued compelling software recommendations for decades, with less than 5% of them worth the bytes into which it was encoded. I cannot find any evidence that this best practice has any effect on anything.
But, to be careful, I check.
, : DLL CLSCompliant?
, MS.
, IronPython, IronRuby F # , , , , .
, CLS-, .