CSharp - Write program to display dates until the year's end

Requirements

You will create a program to display dates until the year's end starting with today and proceeding in one-week steps.

Demo

using System;
class Program{// ww w . j a  va 2  s.c  o  m
    static void Main(string[] args){
        // Today 
        DateTime today = DateTime.Today;
        int thisYear = today.Year;

        // Repeating 
        DateTime date = today;
        do
        {
            // Output 
            Console.WriteLine(date.ToLongDateString());

            // Preparing next output (a week later) 
            date = date.AddDays(7);
        } while (date.Year == thisYear);
    }
}

Result