public override string ToString() { string[] Days = new string[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" }; string str = null; for (int i = 0; i < 6; i++) { if (workHours[i].DayWork) { str += Days[i] + ": From " + workHours[i].StartHour.ToString(@"hh\:mm") + " to " + workHours[i].EndHour.ToString(@"hh\:mm") + "\n"; } } return(AttributeClass1.ToStringProperty(this) + "\n" + "days that need nanny:" + "\n" + str); }
public override string ToString() { return(AttributeClass1.ToStringProperty(this)); }