It's not who you are underneath, it's what you do that defines you

C#实现按月循环

DateTime _BeginDate =DateTime.Parse("2006-07-01");
DateTime _EndDate = DateTime.Parse("2005-05-01");

  DateTime _Date =_BeginDate;
  while (true)
  {
  MessageBox.Show(_Date.ToString("yyyy-MM"));
  _Date = _Date.AddMonths(1);

  if (_Date.Year >= _EndDate.Year && _Date.Month > _EndDate.Month) break;
  }
posted @ 2012-06-21 14:11  金铭杰  阅读(880)  评论(0编辑  收藏  举报

Brick walls are there for a reason :they let us prove how badly we want things