9.11. Common typing with other .NET languages

Adherence to the CTS enables all .NET languages to interoperate. Having a common type system enables codes from different languages to integrate seamlessly. You can easily pass a variable of a common type between methods written in different .NET languages. You can even write a class in C# which inherits from a class written in VB .NET. One factor that makes such interoperability possible is the adherence of each .NET programming language to the CTS.

The CTS specifies a set of common types shared by all the .NET programming languages. You can either use the full .NET framework type name or the C# alias [9] in your C# programs. Table 9.6 shows the available C# aliases for types defined in the CTS. ...

Get From Java to C#: A Developer's Guide 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.