InterviewSolution
| 1. |
What is CLS |
|
Answer» CLS stands for Common Language Specification as the name suggests it set of certain feature which is very helpful for library and compiler writers if any other language that supports CLS can be used FULLY in each other's language, thus we can say that CLS is a subset of the common type system. It is actually a set of restrictions on the CTS. It not only defines the types allowed in external calls, but also the rules for USING them, depending on the goal of the user. CLS is basically a subset of the entire set of features supported by CLR. With CLS, we can call virtual methods or can overload methods and not include things such as unsigned types. It defines a common LEVEL of language functionality. CLR is the set of rules that a language compiler MUST follow while creating a .NET application at run in CLR. Anyone who wants to write a .NET·-compliant compiler needs simply to adhere to these rules and that's it.CLS is a set of rules through which we can exchange information over a single platform. The beauty of this is that the restriction to use features only applies to public and protected members of classes public classes. Within the private methods of your classes, any non-CLS code can be written, because the code in other assemblies cannot access this PART of your code |
|