[Solved] Get days of a week, by a day of the month
private DateTime[] weekByDay(DateTime date) { DateTime[] week = new DateTime[5]; while (date.DayOfWeek != DayOfWeek.Monday) //while day is not monday { date = date.AddDays(-1); //substract 1 day to date } week[0] = date; //add the current day (monday), to the array for (int i = 1; i < 5; i++) //add the next day till Friday … Read more