為什么先定義string text, 后面的text有問(wèn)題嗎?不能通過(guò)
??????????? int year = 2015;//年份
? ? ? ? ? ? string text;
? ? ? ? ? ? text = year % 4 == 0 ? "閏年" : "平年";//請(qǐng)?zhí)顚?xiě)代碼
??????????? Console.WriteLine("今年是{0}",text);
??????????? int year = 2015;//年份
? ? ? ? ? ? string text;
? ? ? ? ? ? text = year % 4 == 0 ? "閏年" : "平年";//請(qǐng)?zhí)顚?xiě)代碼
??????????? Console.WriteLine("今年是{0}",text);
2020-11-11
舉報(bào)
2020-11-13
text是系統(tǒng)變量