In this chapter, we are going to make object-oriented concepts real, by building a simple bank-account class. The final version of the class maintains a bank account’s name and balance, and provides properties (Name and Balance), and methods (Deposit and Withdraw) for behaviors including:

  1. querying the balance (with the Balance property),

  2. making deposits that increase the balance (with the Deposit method) and

  3. making withdrawals that decrease the balance (with the Withdraw method).

We’ll build the Balance property and Deposit method into the chapter’s examples.

Each class you create becomes a new type you can use to create objects, so C# is an extensible programming language.