You are previewing OOP with Microsoft Visual Basic .NET and Microsoft Visual C# .NET Step by Step.
O'Reilly logo
OOP with Microsoft Visual Basic .NET and Microsoft Visual C# .NET Step by Step

Book Description

Embark upon object-oriented programming in the .NET era with this straightforward, accessible guide. You’ll absorb object-oriented design concepts and terminology and learn to construct elegant OOP programs with two powerful development languages.

Table of Contents

  1. Copyright
  2. Acknowledgments
  3. Introduction
  4. Writing Your First Object-Oriented Program
    1. Reading Books: Your First Object-Oriented Program
    2. Using the Class View
    3. Creating the ReadBooks Program
    4. Quick Reference
  5. Creating Class Instances with Constructors
    1. Constructors
    2. Reading Books: Another Implementation
    3. Reference and Value Types
    4. Understanding Array Declarations
    5. Quick Reference
  6. Creating Fields and Properties
    1. Design Considerations for Properties
    2. Code Analysis: A Host of Properties
    3. Code Analysis: Using Indexers and Default Properties
    4. Quick Reference
  7. Working with Methods
    1. A Deck of Cards
    2. Quick Reference
  8. Using Inheritance to Create Specialized Classes
    1. Inheritance: An Overview
    2. BankAccount: A Simple Example
    3. Inherit from a Control: The RoundButton Class
    4. Quick Reference
  9. Designing Base Classes as Abstract Classes
    1. Abstract Classes
    2. The BankAccount Class Revisited
    3. A Typed Collection Class
    4. Quick Reference
  10. Responding to Changes with Events and Exceptions
    1. Fire on the Tracks! An Event-Driven Application
    2. Setting Up Event Methods Without Using the Designer
    3. Exceptions—When Things Go Wrong
    4. Quick Reference
  11. Putting It All Together with Components
    1. The Memory Game
    2. The Games Class Library
    3. The Memory Game Application
    4. Quick Reference
  12. Providing Services Using Interfaces
    1. An IMoveable Interface
    2. .NET Framework Interfaces
    3. Two Other Uses of Interfaces
    4. Quick Reference
  13. Using Classes Interchangeably Through Polymorphism
    1. Pattern Maker
    2. Pattern Maker Design
    3. The Base Classes
    4. The Derived Classes
    5. The User Interface
    6. Quick Reference
  14. Using Shared and Static Members
    1. Shared and Static Members
    2. A More Interesting Point
    3. A More Efficient Card
    4. The Singleton Pattern
    5. Design Considerations
    6. Quick Reference
  15. Overloading Operators with Visual C#
    1. A Short Lesson on Vectors
    2. Vector Algebra Application
    3. Quick Reference
  16. Saving Instance Data
    1. Serialization
    2. DataSets
    3. Quick Reference
  17. Reducing Complexity by Design
    1. The .NET Design Guidelines
    2. Refactoring
    3. Design Patterns
    4. Quick Reference
  18. Additional Resources
    1. Books
    2. Organizations
  19. About the Author
    1. Height Gage
  20. Index