DateTime theMonth = DateTime.Now;
for(int i = 0; i<8; i++){
string curMonth = theMonth.AddMonths(-i).ToString("MM/yyyy");
}
または、
DateTime theMonth = DateTime.Now;
string curMonth;
for(int i = 0; i<8; i++){
curMonth = theMonth.AddMonths(-i).ToString("MM/yyyy");
}
どちらが正しいか、より良い表現ですか? それとも同じ?