i am new to class/object.I am getting this error. I don't know why this is not navigating to the desired page. There is my code. Thanks for helping~~
WebService1.asmx.cs
public class yearList
{
    public yearList(){}
    public int year;
    public List<int> list;
    public List<int> List()
    {
         for (int i = -2; i < 3; i++)
        {
            list.Add(year+i);
        }
         return list;
    }
}
[WebMethod]
public List<int> List()
{
    yearList yl = new yearList();
    string connStr2 = ConfigurationManager.ConnectionStrings["taisangrent_sql"].ConnectionString;
    SqlConnection conn2 = new SqlConnection(connStr2);
    string strSQL2 = "select YEAR(getdate()) as year";
    SqlDataAdapter adapter2 = new SqlDataAdapter(strSQL2, conn2);
    DataSet ds2 = new DataSet();
    adapter2.Fill(ds2, "y_m");
    yl.year = int.Parse(ds2.Tables["y_m"].Rows[0]["year"].ToString());
    return yl.List();                    
}
 
     
     
    