The following keywords and attribute implement Managed Extensions for C++.
Note All code examples must be compiled using the /com+ compiler option.
Keyword | Description |
---|---|
__abstract | Declares a class that cannot be instantiated directly. |
__box | Creates a copy of a value class. |
__delegate | Declares a reference to a unique method within an instance of a managed class. |
__finally | Declares a finally block. |
__gc | Declares a garbage-collected class. |
__nogc | Declares a native C++ class that is not garbage-collected. |
__pin | Prevents a managed object from being moved by the NGWS runtime. |
__property | Declares a property member for a managed class. |
__sealed | Prevents a method or class from being a base class. |
__serializable | Allows a garbage-collected class to be serialized. |
__transient | Prevents a data member from being serialized. |
__try_cast | Throws an exception if the cast is illegal. |
__value | A version of dynamic_cast that may throw an exception. |
The following attribute supports various features of the NGWS runtime.
Attribute | Description |
---|---|
sysimport | Imports an unmanaged function into a managed application. |
Contents of the C++ Language Reference | Managed Extensions for C++| Introduction to Managed Extensions for C++