Beispiel #1
0
        static void Main(string[] args)
        {
            var rice                   = new Rice();
            var greenPepperRice        = new GreenPepper(rice);
            var cabbageGreenPepperRice = new Cabbage(greenPepperRice);

            Console.WriteLine(cabbageGreenPepperRice.FoodFullName + ":" + cabbageGreenPepperRice.FoodFullMoney);
            Console.ReadLine();
        }
 static void Main(string[] args)
 {
     var rice = new Rice();
     var greenPepperRice = new GreenPepper(rice);
     var cabbageGreenPepperRice = new Cabbage(greenPepperRice);
     Console.WriteLine(cabbageGreenPepperRice.FoodFullName+":"+cabbageGreenPepperRice.FoodFullMoney);
     Console.ReadLine();
 }