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); }
public string Details() { return($"Created: { CreatedAt.ToShortDateString() }\nTitle: { Title }\nDescription: { Description }\nLikes: { this.Like }"); }
public override string ToString() { return($"CreatedAt:{CreatedAt.ToShortDateString()} - UserId:{UserId} - Length:{Body.Length} - Likes:{Likes} - PostId:{PostId}"); }
public override string ToString() { return($"TodoId:{Id} - Created:{CreatedAt.ToShortDateString()} - Name:{Name}({Name.Length}) - Completed:{IsComplete} - UserId:{UserId}\n"); }
public override string ToString() => $"[{Id}] {Name} (cap: {Capacity}/{MaxCapacity}) от " + CreatedAt.ToShortDateString() + ((RemovedAt != null) ? "(удалено " + RemovedAt?.ToShortDateString() + ")" : "");
private string getDateToUse() { return(UpdatedAt.HasValue ? UpdatedAt.Value.ToShortDateString() : CreatedAt.ToShortDateString()); }
public override string ToString() { return($"PostId:{Id} - CreatedAt:{CreatedAt.ToShortDateString()} - Title:{Title} - UserId:{UserId} - Likes:{Likes} - Comments:{Comments.Count()}\n"); }
public override string ToString() { return($"{Id} - {Name} {CreatedAt.ToShortDateString()} - {FinishedAt.ToShortDateString()}"); }
/// <inheritdoc /> public override string ToString() => $"Name: {Name}, CreatedAt: {CreatedAt.ToShortDateString()}, Id: {IdInDay}";