13
Làm cách nào để kiểm tra xem DateTime có xảy ra hôm nay không?
Có cách .net nào tốt hơn để kiểm tra xem DateTime có xảy ra 'hôm nay' hay không, sau đó là mã bên dưới? if ( newsStory.WhenAdded.Day == DateTime.Now.Day && newsStory.WhenAdded.Month == DateTime.Now.Month && newsStory.WhenAdded.Year == DateTime.Now.Year ) { // Story happened today } else { // Story didn't happen …