Exemple #1
0
        static void Main(string[] args)
        {
            Printer printer = new Printer();

            printer.Print("Test1");
            PhotoPrinter photoPrinter = new PhotoPrinter();

            photoPrinter.Print("Test2");
            photoPrinter.Print("Test2", "img2");
            ColourPrinter colourPrinter = new ColourPrinter();

            colourPrinter.Print("test3");
            colourPrinter.Print("test3", ConsoleColor.Cyan);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var mess  = "Some message";
            var print = new Printer();

            print.Print(mess + "\n");

            var colourPrint = new ColourPrinter();

            colourPrint.Print(mess);
            colourPrint.Print(mess, ConsoleColor.Blue);

            Console.WriteLine();
            var photoPrint = new PhotoPrinter();

            photoPrint.Print(mess);
            photoPrint.Print(mess, "Cute cat");

            Console.ReadLine();
        }