コード例 #1
0
ファイル: DIP_Good.cs プロジェクト: rikrd92/Blog
        public static void Main()
        {
            // Send output to Printer
            IReader r = new KeyboardReader();
            IWriter pw = new PrinterWriter();
            Copy cp = new Copy(r, pw);
            cp.DoWork();

            // Send output to FileStream now 
            IWriter fw = new FileWriter();
            Copy cpf = new Copy(r, fw);
            cpf.DoWork();

            Console.ReadLine();
        }