public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); foreach (var article in ArticleList) { stringBuilder.AppendLine(article.ToString()); } stringBuilder.AppendLine("Persons:"); foreach (var person in PersonsList) { stringBuilder.AppendLine(person.ToString()); } return(string.Format( " NameTitle: {0},\n Period: {1},\n DateEdition: {2},\n Article: {3},\n AverageRate: {4}\n", NameTitle, Period, DateEdition.ToShortDateString(), stringBuilder, AverageRate)); }
public virtual string ToShortString() { return(string.Format(" NameTitle: {0},\n Period: {1},\n DateEdition: {2},\n AverageRate: {3}\n", NameTitle, Period, DateEdition.ToShortDateString(), AverageRate)); }