Esempio n. 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(
                       " MagazineName: {0},\n Timing: {1},\n MagazineDate: {2},\n Article: {3},\n MiddleRate: {4}\n",
                       MagazineName, Timing, MagazineDate.ToShortDateString(), stringBuilder, MiddleRate));
        }
Esempio n. 2
0
 public virtual string ToShortString()
 {
     return(string.Format(" MagazineName: {0},\n Timing: {1},\n MagazineDate: {2},\n MiddleRate: {3}\n",
                          MagazineName, Timing, MagazineDate.ToShortDateString(), MiddleRate));
 }