Primitive Types

User-defined types typically contain data, and all pieces of such data should have a type by itself. Those types could be user-defined again but, obviously, at some point predefined types need to be used. One of the CTS’s roles is to provide a number of such primitive data types. Various languages on top of the .NET Framework have different “friendly names” defined for those data types, but in the end they are all represented using their underlying type, which is defined in the mscorlib.dll assembly that’s part of the BCL. The fact that various languages use the same built-in types is one of the cornerstones that allows true cross-language integration.

Table 1.1 shows primitive types that CLS-compliant languages are supposed to ...

Get C# 5.0 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.