예제 #1
0
        public override string ToString()
        {
            string result = $"Id:{Id} Created:{CreatedAt.ToShortDateString()}\nName:{Name}\nEmail:{Email}\nAddress:{MyAddress}\n";

            if (Todos != null && Todos.Count() > 0)
            {
                result += "\tToDos list:\n";
                foreach (var item in Todos)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            if (Posts != null && Posts.Count() > 0)
            {
                result += "\tPosts list:\n";
                foreach (var item in Posts)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            if (Comments != null && Comments.Count() > 0)
            {
                result += "\tComments list:\n";
                foreach (var item in Comments)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            return(result);
        }
예제 #2
0
 public string Details()
 {
     return($"Created: { CreatedAt.ToShortDateString() }\nTitle: { Title }\nDescription: { Description }\nLikes: { this.Like }");
 }
예제 #3
0
 public override string ToString()
 {
     return($"CreatedAt:{CreatedAt.ToShortDateString()} - UserId:{UserId} - Length:{Body.Length} - Likes:{Likes} - PostId:{PostId}");
 }
예제 #4
0
 public override string ToString()
 {
     return($"TodoId:{Id} - Created:{CreatedAt.ToShortDateString()} - Name:{Name}({Name.Length}) - Completed:{IsComplete} - UserId:{UserId}\n");
 }
예제 #5
0
 public override string ToString()
 => $"[{Id}] {Name} (cap: {Capacity}/{MaxCapacity}) от " + CreatedAt.ToShortDateString() + ((RemovedAt != null) ? "(удалено " + RemovedAt?.ToShortDateString() + ")" : "");
예제 #6
0
 private string getDateToUse()
 {
     return(UpdatedAt.HasValue ? UpdatedAt.Value.ToShortDateString() : CreatedAt.ToShortDateString());
 }
예제 #7
0
 public override string ToString()
 {
     return($"PostId:{Id} - CreatedAt:{CreatedAt.ToShortDateString()} - Title:{Title} - UserId:{UserId} - Likes:{Likes} - Comments:{Comments.Count()}\n");
 }
예제 #8
0
 public override string ToString()
 {
     return($"{Id} - {Name} {CreatedAt.ToShortDateString()} - {FinishedAt.ToShortDateString()}");
 }
예제 #9
0
 /// <inheritdoc />
 public override string ToString() => $"Name: {Name}, CreatedAt: {CreatedAt.ToShortDateString()}, Id: {IdInDay}";