示例#1
0
        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));
        }
示例#2
0
 public virtual string ToShortString()
 {
     return(string.Format(" NameTitle: {0},\n Period: {1},\n DateEdition: {2},\n AverageRate: {3}\n",
                          NameTitle, Period, DateEdition.ToShortDateString(), AverageRate));
 }