I have a wpf application. when I run it it close. I debugged it and I found that this linq query close it(I don't know why!)
TodayCards = cards.Where(i => (i.NextTime.Day == DateTime.Now.Day && i.NextTime.Month == DateTime.Now.Month && i.NextTime.Year == DateTime.Now.Year)).Select(i => i).ToList();
I also tried
TodayCards = cards.Where(i => (i.NextTime.Day == DateTime.Now.Day && i.NextTime.Month == DateTime.Now.Month && i.NextTime.Year == DateTime.Now.Year)).ToList();
but it closed it both situations.