public void Mostrar() { Console.WriteLine("Razón social: " + this._razonSocial); Console.WriteLine("Ganancia: " + GananciaTotal.ToString()); Console.WriteLine("\n-------Listado de llamadas-------\n"); foreach (Llamada l in this._listaDeLlamadas) { l.Mostrar(); } }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine("Razón social: " + this._razonSocial); sb.AppendLine("Ganancia: " + GananciaTotal.ToString()); sb.AppendLine("\n-------Listado de llamadas-------\n"); foreach (Llamada l in this._listaDeLlamadas) { sb.AppendLine(l.ToString()); } return(sb.ToString()); }