April 2014
Intermediate to advanced
960 pages
22h 9m
English
This appendix provides information about class and structure declarations.
The syntax for declaring a class follows.
«attributes» «accessibility» «abstract|sealed|static» «partial»
class name «inheritance»
{
statements
}
The following list describes the declaration’s pieces.
public, internal, private, protected, or protected internal.abstract—This keyword means you cannot create instances of the class. Instead you can make instances of derived classes.sealed—This keyword means you cannot derive other classes from the class.static—This keyword means you cannot derive other classes from the class or create instances of it. You invoke the members of a static class by using the class’s name instead of an instance. All members of a static class must also be declared static.partial—This keyword indicates that this is only part of the class declaration and that the program may include other partial declarations for this class.The syntax for writing a structure follows.
«attributes» «accessibility» «partial» struct name «interfaces»
{
statements
}
The structure’s attributes
Read now
Unlock full access