|
To | Do this |
Create a class. | Use the keyword class. |
Control the visibility of variables and methods. | Use the access control keywords public, private, or protected, followed by a colon(:). |
Declare a reference type class. | Place the __gc keyword before the class specifier. |
Declare a value type class. | Place the __value keyword before the class specifier. |
Instantiate a reference type class object. | Declare a pointer of the class type for the object. Use the new keyword followed by the name of the class to create the object on the CLR heap, and assign the returned pointer to the object pointer declared above. For example: |
Instantiate a value type class object. | Define the object by stating its class followed by the variable name for the object. For example: |
|