Chapter 35. Cross-Language Programming with C#

In This Chapter

  • The Common Type System (CTS)

  • The Common Language Specification (CLS)

  • Tips for Making Your Code CLS-Compatible

  • Writing a Cross-Language Program

The Common Language Specification (CLS) is a standard for assemblies to be written in the developer's language of choice, yet the compiled assemblies can be used by any other language. For example, if a DLL is written in Visual Basic.NET and follows the rules of the CLS, the types in that library can be used by any C# program. An important element supporting the CLS is the Common Type System (CTS), which provides a set of types that are common for all CLS-compatible languages.

This essentially means that programmers can use any CTS/CLS–compliant ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.