PageRenderTime 121ms CodeModel.GetById 30ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/examples/LinFu.AOP.Samples/SampleLibrary/BankAccount.cs

http://github.com/philiplaureano/LinFu
C# | 36 lines | 30 code | 6 blank | 0 comment | 0 complexity | a465804eb7f6804f02a4664d37c640d9 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Diagnostics;
 4using System.Linq;
 5using System.Text;
 6
 7namespace SampleLibrary
 8{
 9    public class BankAccount
10    {
11        private int _balance;
12
13        public BankAccount(int balance)
14        {
15            _balance = balance;
16        }
17
18        public int Balance
19        {
20            get { return _balance; }
21        }
22
23        public void Deposit(int amount)
24        {
25            _balance += amount;
26
27            Console.WriteLine("Deposited: {0}", amount);
28            Console.WriteLine("New Balance: {0}", Balance);
29        }
30
31        public void Withdraw(int amount)
32        {
33            _balance -= amount;
34        }
35    }
36}