Site MapHelpFeedbackChapter Summary
Chapter Summary
(See related pages)

    1. Objects have properties and methods, and can trigger events.
    2. You can create a new class that can then be used to create new objects.
    3. Creating a new object is called instantiating the object; the object is called an instance of the class.
    4. In object-oriented terminology, encapsulation refers to the combination of the characteristics and behaviors of an item into a single class definition.
    5. Inheritance provides a means to derive a new class based on an existing class. The existing class is called a base class, superclass, or parent class. The inherited class is called a subclass, derived class, or child class.
    6. Polymorphism allows different classes of objects in an inheritance hierarchy to have similarly named methods that behave differently for that particular object.
    7. One of the biggest advantages of object-oriented programming is that classes that you create for one application may be reused in another application.
    8. Multitier applications separate program functions into a Presentation tier (the user interface), Business tier (the logic of calculations and validation), and Data tier (accessing stored data).
    9. To plan a new class, you need to model the required characteristics (properties) and behaviors (methods).
    10. The variables inside a class used to store the properties should be private, so that data values are accessible only by methods within the class.
    11. The way to make the properties of a class available to code outside the class is to use Property methods. The get portion returns the value of the property and the set portion assigns a value to the property. Validation is often performed in the set portion.
    12. Read-only properties have only a get accessor method. Write-only properties have only a set accessor method.
    13. A constructor is a method that automatically executes when an object is created; a destructor method is triggered when an object is destroyed.
    14. A constructor method must have the same name as the class and may be overloaded.
    15. A parameterized constructor requires arguments to create a new object.
    16. Property methods may have mixed access levels; that is, the get or set may have a more restrictive access level than the other.
    17. To instantiate an object of a class, you must use the new keyword on either the declaration statement or an assignment statement. The location of the new keyword determines when the object is created.
    18. Static members (properties and methods) have one copy that can be used by all objects of the class, generally used for totals and counts. Instance members have one copy for each instance of the object. Declare static members with the static keyword.
    19. The garbage collection feature periodically checks for unreferenced objects, destroys the object references, and releases resources.
    20. A subclass inherits all public and protected properties and methods of its base class, except for the constructor.
    21. To override a method from a base class, the original method must be declared as virtual or abstract, and the new method must use the override keyword.
    22. A base class used strictly for inheritance is called an abstract class and cannot be instantiated. The class should be declared as abstract and the methods that must be overridden should be declared as abstract.
    23. You can use visual inheritance to derive new forms from existing forms.
    24. You can use the Object Browser to view classes, properties, methods, events, and constants in system classes as well as your own classes.







Programming in Visual C# 2005Online Learning Center

Home > Chapter 12 > Chapter Summary