我正在使用以下查询来获取下个月.
int theMonth = ((System.DateTime)periodStartDate).Month+1;
但是如果periodstartDate month id = s 12月,则上述语句会抛出错误.
c# datetime
c# ×1
datetime ×1