コード例 #1
0
ファイル: Program.cs プロジェクト: Maceage/DesignPatterns
        private static void BuildSmallCake()
        {
            Cake smallCake = new SmallCake();
            smallCake = new Icing(smallCake);

            Console.WriteLine(smallCake.GetDescription());
            Console.WriteLine("{0:C2}", smallCake.CalculateCost());
        }
コード例 #2
0
        private static void BuildSmallCake()
        {
            Cake smallCake = new SmallCake();

            smallCake = new Icing(smallCake);

            Console.WriteLine(smallCake.GetDescription());
            Console.WriteLine("{0:C2}", smallCake.CalculateCost());
        }