title: How to get the list of week start date (Monday) and end date (Sunday) for the year in C#
body: <p>I want to get only weeks for the whole year where I want to get the start date (Monday) and end date (Friday) in C#.
  For example: <code>1/52</code> =  <code>02 Jan (Monday) - 09 Jan (Sunday)</code> <code>2/52</code> =  <code>10 Jan (Monday) - 17 Jan (Sunday)</code>
  and so on.
  I can get current week dates but no idea how to get for the year.</p>
  <pre><code>// We Set the Monday as the first day of the week.
  DayOfWeek day = datetime.DayOfWeek;
  int days = day - DayOfWeek.Monday;
  if (days == -1)
  {
      days = 6;  // this is when we have sunday as a DayOfWeek day
  }
  
  DateTime start = datetime.AddDays(-days);
  DateTime end = start.AddDays(6);
  </code></pre>