Check Current Year is LeapYear?????????For beginner

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1006
                                                                     



-----------------------------
Current year is leapyear....
-----------------------------

if ((last.Year % 4 == 0) && (last.Year % 100 != 0) || (last.Year % 400 == 0))
{
label3.Text = (" this year is leap year");
}
else
{
label3.Text = ("Notleap year");
}

-----------------------------------------
Leap year Is True OR NOt OF Current Year
-----------------------------------------

label2.Text = (DateTime.IsLeapYear(last.Year)).ToString();

Comments or Responses

Login to post response