I have a couple of nagging compiler warnings for an app that I ported from VB6 a while back regarding CLS-Compliance including:
Name '_AnIdentifier' is not CLS-Compliant.
Type of parameter 'myType' is not CLS-Compliant.
Despite this, my app seems to perform just fine from COM and Managed clients. I have seen several articles describing what to do to make the code CLS-Compliant and I probably will go ahead and do it anyway to get rid of the nagging warnings, but I am curious what the drawbacks of non-CLS compliant code are in practical terms? What limitations is this imposting that I haven't discovered yet?
Basically, your class may not be accessible (or may act oddly, such as large positive numbers being treated as negative), when used with some .NET languages. I cannot say what languages they might be.
For example, I don't believe a language is required to recognize an identifer that begins with an underscore. C# allows it, so you're safe there, but for other languages, "_AnIdentifier" may be hidden, or have a system generated name.
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