Exemplo n.º 1
0
        // Create the account and subscribe the event handler.
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create the account.
            TheAccount = new MoneyMarketAccount();
            TheAccount.Balance = 100m;

            // Subscribe to the Overdrawn event.
            TheAccount.Overdrawn += OverdrawnHandler;

            // Display the account balance.
            DisplayBalance();
        }
Exemplo n.º 2
0
        // Create the account and subscribe the event handler.
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create the account.
            TheAccount         = new MoneyMarketAccount();
            TheAccount.Balance = 100m;

            // Subscribe to the Overdrawn event.
            TheAccount.Overdrawn += OverdrawnHandler;

            // Display the account balance.
            DisplayBalance();
        }