📅  最后修改于: 2022-03-11 14:48:57.729000             🧑  作者: Mango
public void DaysTillXmas()
{
DateTime Xmas = new DateTime(DateTime.Now.Year, 12, 25);
TimeSpan diff = (Xmas - DateTime.Now);
Console.WriteLine(diff.Days + " Days till Christmas.");
}