Class

Is the most common reference type.

class MyClassName
{
   //methods, properties, fields, events, delegates, nested classes
}

Complex class has:

  1. Preceding the keyword class

    Attributes and modifiers such as Non-nested class modifiers

    1. public
    2. internal
    3. abstract
    4. sealed
    5. static
    6. unsafe
    7. partial
    8. private
  2. Following MyClassName
    1. Generic type parameters
    2. base class
    3. interfaces
  3. Within the braces

    Class members

    1. methods
    2. properties
    3. indexers
    4. events
    5. fields
    6. constructors
    7. overloaded operators
    8. nested types
    9. finalizer

Leave a Reply

Your email address will not be published. Required fields are marked *