GetDescription() публичный Метод

public GetDescription ( ) : string
Результат string
 void OnEnable()
 {
     Debug.Log ("------------------");
     Debug.Log ("DECORATOR DESIGN PATTERN");
     // Make Pizzas:
     IPizza basicPizza = new TomatoSauce(new Mozzarella(new PlainPizza()));
     Debug.Log ("Ingredients of Pizza: " + basicPizza.GetDescription());
     Debug.Log ("Total Cost: " + basicPizza.GetCost());
 }
        void OnEnable()
        {
            Debug.Log("------------------");
            Debug.Log("DECORATOR DESIGN PATTERN");
            // Make Pizzas:
            IPizza basicPizza = new TomatoSauce(new Mozzarella(new PlainPizza()));

            Debug.Log("Ingredients of Pizza: " + basicPizza.GetDescription());
            Debug.Log("Total Cost: " + basicPizza.GetCost());
        }
Пример #3
0
        static void Main(string[] args)
        {
            Pizza basicPizza = new TomatoSauce(new Mozzarella(new PlainPizza()));

            Console.WriteLine($"Ingredients : {basicPizza.GetDescription()}");

            Console.WriteLine($"Price : {basicPizza.GetCost()}");

            Console.ReadKey();
        }