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