Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MyPrinter printer = new MyPrinter();
            User      u1      = new User("Meir", printer);
            User      u2      = new User("Shlomi", printer);

            //printer.PageOver();
            Console.WriteLine("Please enter pages to print:");
            int x = int.Parse(Console.ReadLine());

            printer.Print(x);
        }
Exemplo n.º 2
0
 public User(string name, MyPrinter printer)
 {
     this.name         = name;
     myPrinter         = printer;
     printer.PageOver += myPageOver;
 }