为什么会有这个警告?Program.cs(11,17): warning CS0219: The variable `year' is assigned but its value is never used Compilation succeeded - 1 warning(s) 今年是平年
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int year = 2015;//年份
string text;
text= 2015%4==0?"闰年":"平年";//请填写代码
Console.WriteLine("今年是{0}",text);
}
}
}