CTS (Common types system): -
In .NET there are lots of languages like C#, VB.NET, VF.NET etc. There can be situations when we want code in one language to be called in other language. In order to ensure smooth communication between these languages the most important thing is that they should have a common type system. CTS (Common types system) ensure that data types defined in two different languages get compiled to a common data type.
So “Integer” data type in VB6 and “int” data type in C++ will be converted to System.int32, which is data type of CTS.
Note: - If you know COM programming, you would know how difficult
it is to interface VB6 application with
VC++ application. As datatype of both languages did not have a common ground
where they can come and interface, by having CTS interfacing is smooth.
CLS (Common Language Specification): -
CLS is a subset of CTS. CLS is a specification or set of rules or guidelines. When any programming language adheres to these set of rules it can be consumed by any .NET language.
For instance one of the rules which makes your application CLS non-compliant is when you declare your methods members with same name and with only case differences in C#. You can try this create a simple class in C# with same name with only case differences and try to consume the same in VB.NET ,it will not work.