NextSunday

public static DateTime NextSunday(this DateTime dt)
{
    return new GregorianCalendar().AddDays(dt, -( (int)dt.DayOfWeek ) + 7);
}
Example:
var nextSunday = DateTime.Now.NextSunday();

Description

Get's the date of the upcoming Sunday.

Details

Double click on the code to select all.

 

;