Our initial markup
Let's begin with a very simple markup, shown here in the Source
view:

Figure 6.1.1: The initial simple markup for this chapter
If we switch over to the Design
view, all we have is a button that says Show Balance
, and under it a Label
control where the balance can actually be displayed, as shown in the following screenshot:

Figure 6.1.2: The initial interface in the Design view
Creating a class
Now, double-click on Show Balance
. Here, we will create a class that represents bank accounts. Start by deleting comment 4, which is not suitable for our purposes, and then enter the following under using system:
class BankAccount
Here, class
is a keyword, so it's blue of course, and BankAccount
is an identifier—it's a name you make up. In other words, this means if I want to, I can put Bob
or VideoGameCharacter
there—whatever I need to represent. So, in our case, BankAccount
is what I put there.
In the context of what we are creating, let's describe the purpose of this line in the new...