Пример #1
0
 string IBakeryComponent.GetName()
 {
     return($"{m_BaseComponent.GetName()}, {m_Name}");
 }
Пример #2
0
 private static void PrintProductDetails(IBakeryComponent cBase)
 {
     Console.WriteLine(string.Format("Item: {0}, Price: {1}", cBase.GetName(), cBase.GetPrice()));
 }
Пример #3
0
 public virtual string GetName()
 {
     return(string.Format("{0}, {1}", m_BaseComponent.GetName(), m_Name));
 }
Пример #4
0
 private static void PrintProductDetails(IBakeryComponent component)
 {
     Console.WriteLine(); // some whitespace for readability
     Console.WriteLine("Item: {0}, Price: {1}", component.GetName(), component.GetPrice());
 }