public override string GetName() { return($"{_baseComponent.GetName()}, {Name}"); }
public override string GetName() { return(string.Format("{0}, {1}", _component.GetName(), m_Name)); }
private static void PrintProductDetails(BakeryComponent product) { Console.WriteLine(); // some whitespace for readability Console.WriteLine("Item: {0}, Price: {1}", product.GetName(), product.GetPrice()); }
string BakeryComponent.GetName() { return(string.Format("{0}, {1}", BaseComponent.GetName(), name)); }