日期:2014-05-17 浏览次数:20903 次
DateTime dt = DateTime.Now; for (int i = 0; i < 31; i++) { MessageBox.Show(dt.AddDays(i).ToShortDateString()); }
for (int i = 0; i < 30; i++) { Console.WriteLine(DateTime.Now.Date.AddDays(i).ToShortDateString()); }