Q:

Finding every friday from start date till the end of the year

So I'm back with another baffling DateTime question.
In C#, how would I return the (day) for every Friday from a start date (DateTime.Now) until the end of the current year?
So for example, today being Friday the 19th, it would return, 26, 2, 9, 16, 23, 30, 7, etc.

A:

Does this work?  
static IEnumerable<DateTime> GetFridays(DateTime startdate, DateTime enddate)
{
    // step forward to the first friday
    while (startdate.DayOfWeek != DayOfWeek.Friday)
        startdate = startdate.AddDays(1);

    while (startdate < enddate)
    {
        yield return startdate;
        startdate = startdate.AddDays(7);
    }
}

