maybe?
var monthsBack = 0;
while (monthsBack < 6)
{
var current = DateTime.Now.AddMonths(-monthsBack);
dict.Add(
current,
filtered.Where(f => f.DateCreated.Year == current.Year && f.DateCreated.Month == current.Month).ToList()
);
monthsBack++;
}
yes: { }
What is this code doing
Обсуждают сегодня