DateTime.IsLeapYear : DateTime « System « VB.Net by API






DateTime.IsLeapYear

  
Imports System.IO

Module Module1

    Sub Main()
        Dim Dt As DateTime = Now()


        If (Dt.IsLeapYear(Dt.Year)) Then
            Console.WriteLine("This is a leap year")
        Else
            Console.WriteLine("This is not a leap year")
        End If

    End Sub

End Module

   
    
  








Related examples in the same category

1.New DateTime
2.DateTime.DayOfWeek
3.DateTime.Second
4.DateTime.Subtract
5.DateTime.ToUniversalTime()
6.DateTime.UtcNow()
7.DateTime.Year