To test above function:-Response.Write("No of days is :- " + GetNoOfDaysInYear(DateTime.Now.Year) + "<br/>");Response.Write("No of days is :- " + GetNoOfDaysInYear(2016) + "<br/>");Response.Write("No of days is :- " + GetNoOfDaysInYear(2017) + "<br/>");