Geeks With Blogs

News INETA Community Speakers Program WTFNext's hosting!

View Stacy Vicknair's profile on LinkedIn

WTF Next? Dev ramblings from a master of nothing.

The answer, as with so many other questions in the coding world, is that it depends. However, for the average developer CLS compliance is not a concern. For the specialized component or tool developer CLS compliance might be your bread and butter winner.

For the average developer, CLS compliance is nothing more than bragging rights or an enforced rule at your organization. You probably only operate in one language provided graciously from MSFT and have little concern if your libraries will play nicely with the other languages. The benefits of CLS compliance are nullified if you do not work in a multi language environment.

For those who do work in a multilingual (I’m talking programming here) environment then CLS compliance is a step towards less problems. Typically this will affect those who produce frameworks and tools intended to be used by other systems. This could also affect you if you are extending a preexisting system produced in a different language.


How can you take steps toward CLS Compliance?

The first step is to mark you assemblies as CLS Compliant. This can be done by specifying the CLSCompliantAttribute. If you are in C#, the compiler will warn about problems with compliance. If in VB.NET, the compiler will not warn you, but that is supposed to change in the future (When? I’m not sure.)

To take a proactive approach to CLS compliance, you can take a look over the CLS and adhere to the rules that it specifies.


Posted on Wednesday, August 19, 2009 11:46 AM .NET Tips | Back to top

Comments on this post: How necessary is CLS compliance?

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Stacy Vicknair | Powered by: