Custom CTS Type Definitions

To distinguish the definition of CTS types from native type definitions, a set of new keywords has been introduced. These new keywords include white spaces, which avoids conflicts with identifiers (names for variables, types, and type members) in existing C++ code. As an example, the keyword ref class is used to define a custom CTS class. The following code shows a simple managed type definition:

ref class ManagedReferenceType {

int aPrivateField; public: void APublicFunction();

The CTS supports the definition of various other kinds of types and type members. These will be discussed in Chapter 5.

Was this article helpful?

0 0

Post a comment