Hi, I wrote it by hand but hope it'll help :)
public static DateTime GetYearWeekFirstDay(int year, int week)
{
var days = 7 * (week - 1) + 1;
if (days > 366)
throw new InvalidDataException("Invalid week numbers!");
var date = new DateTime(year, 1, 1);
if (date.DayOfWeek != DayOfWeek.Sunday)
date = date.AddDays(7 - (int)(date.DayOfWeek));
var count = 1;
while (count != days)
{
count++;
date = date.AddDays(1);
}
return date;
}