コード例 #1
0
ファイル: Program.cs プロジェクト: AndyMolly/DesignPattern
        static void Main(string[] args)
        {
            Compound stuff = new Compound("UnKnown");
            stuff.Display();

            Compound water = new RichCompound("Water");
            water.Display();

            Compound benzene = new RichCompound("Benzene");
            benzene.Display();

            Compound alcohol = new RichCompound("Alcohol");
            alcohol.Display();

            Console.ReadKey();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: mengtest/DesignPattern
        static void Main(string[] args)
        {
            Compound stuff = new Compound("UnKnown");

            stuff.Display();

            Compound water = new RichCompound("Water");

            water.Display();

            Compound benzene = new RichCompound("Benzene");

            benzene.Display();

            Compound alcohol = new RichCompound("Alcohol");

            alcohol.Display();

            Console.ReadKey();
        }