title: Check to see if year is leap year
body: <pre><code>&lt;script Language=&quot;c#&quot; runat=&quot;server&quot;&gt;
    void Page_Load()
    {
     int currentYear = DateTime.Now.Year();
  
     if (currentYear % 400 == 0) {
       Message2.Text = (&quot;This is a leap year&quot;);
     }
     else {
       Message2.Text = (&quot;This is not a leap year&quot;);
     }
  
   }
  </code></pre>
  <p>Currently I am getting a RunTime error. My goal is to test whether or not the current year, using DateTime.Now.Year()  is a leap year or not. I think the issue is that I am not properly converting year to int? Please advise.</p>