TA貢獻1827條經驗 獲得超8個贊
public List<int> GetDaysFromMonth(int pYear, int pMonth){int vMax = DateTime.DaysInMonth(pYear, pMonth);var vItems = new List<int>();for (int i = 1; i < vMax; i++){vItems.Add(i);}Return vItems;}
TA貢獻1773條經驗 獲得超3個贊
DateTime.DaysInMonth(1999, 2)第一個參數是年,第二個參數是月份,返回天數
舉報
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號