Where Do I Need to Apply?
CLS are important when producing reusable components, such as class libraries or user controls. Because only public classes and public members from public classes can be used from other applications also written in different languages, the Common Language Specification applies only to
• Public classes
• Public members exposed by public classes, such as methods or properties, and members that can be inherited
• Objects used by public members, such as types passed as arguments to methods
In all other cases, such as private members, applying CLS is ignored by the compiler. Another situation when you do not need to apply CLS is when you do not produce reusable components. For example, the UI side of a Windows application ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access