Define CLS and CTS in .Net

Learn: What are Common Language Specification (CLS) and Common Type System (CTS) in .Net? How the CLS and CTS work?
[Last updated : March 26, 2023]

Common Language Specification (CLS)

CLS stands for common Language Specification, as we know that there are many languages used in .NET Framework. CLS defines some set of rules that must be followed by each .NET language to be a .NET compliant language.

These set of rules is used to enable interoperability between two .NET-compliant languages. CLS is the subset of CTS; the language supported by CLS can use each other’s framework class library for application development. Application programming interfaces also known as APIs, which are developed by following these rules (the rules of CLS), can be used by all .NET languages.

Common Type System (CTS)

CTS stands for Common Type System. It is the most important component of CLR.

.NET framework supports multiple languages that contain a type system that is common for all the languages. The languages which are CTS compliant do not require any type of conversion when calling the source code which is written in one language from within the code written in another programming language.

CTS provide set of data types for all the languages supported by .NET framework. CTS use the data type System.Int32 to represent a 4 bytes integer. VB.NET uses the alias Integer for the same; while C#.NET uses the alias int.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.