怎样取得本月的第一天以及最后一天。方法有以下几种:
1. DateTime FirstDay = new DateTime(DateTime.Now.Year,DateTime.Now.Month,1);
DateTime LastDay = new DateTime(DateTime.Now.AddMonths(1).Year,DateTime.Now.AddMonths(1).Month,1).AddDays(-1);
2. DateTime FirstDay = DateTime.Now.AddDays(-DateTime.Now.Day+1);
DateTime LastDay = DateTime.Now.AddMonths(1).AddDays(-DateTime.Now.AddMonths(1).Day);
项目的尾声。暑假要开始小论文了,太迟了,布布扣,bubuko.com
原文:http://www.cnblogs.com/superallen/p/3832357.html