NextDayOfWeek
Will return the next occurring day of week
Source
public static DateTime NextDayOfWeek(this DateTime dt, DayOfWeek day)
{
var d = new GregorianCalendar().AddDays(dt, -((int)dt.DayOfWeek) + (int)day);
return (d.Day < dt.Day) ? d.AddDays(7) : d;
}
Example
DateTime.Now.NextDayOfWeek(DayOfWeek.Tuesday)