Пример #1
0
        static void Main(string[] args)
        {
            AccountProxy accountProxy = new AccountProxy("admin", new Account(100));

            accountProxy.Deposit(10);
            accountProxy.CheckBalance();

            Console.WriteLine();
            AccountProxy acc = new AccountProxy("admifsadfscf", new Account(100));

            acc.CheckBalance();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Account c = new Account(1, "mitocode", 100);

            IAccount accountProxy = new AccountProxy(new AccountBankB());

            accountProxy.ShowMoney(c);
            c = accountProxy.DepositeMoney(c, 50);
            c = accountProxy.RetireMoney(c, 20);
            accountProxy.ShowMoney(c);

            Console.ReadKey();
        }