我有一个 wpf 应用程序。当我关闭它时。我调试了它,发现这个 linq 查询关闭了它(我不知道为什么!)
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();
我也试过
TodayCards = cards.Where(i => (i.NextTime.Day == DateTime.Now.Day && i.NextTime.Month == DateTime.Now.Month && i.NextTime.Year == DateTime.Now.Year)).ToList();
但它关闭了这两种情况。