Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

VB.Net: Is this year a leapyear?

From Wiki

Jump to: navigation, search

Here is how you can determine if a year is a leapyear or not.

  1. Module Module1
  2.  
  3.     Sub Main()
  4.         Dim _Date As New Date(2008, 7, 10)
  5.         Console.WriteLine("begin")
  6.         Console.WriteLine(_Date.ToString("dd/MM/yyyy"))
  7.         Console.WriteLine(Date.IsLeapYear(_Date.Year).ToString)
  8.         _Date = New Date(2007, 7, 10)
  9.         Console.WriteLine(_Date.ToString("dd/MM/yyyy"))
  10.         Console.WriteLine(Date.IsLeapYear(_Date.Year).ToString)
  11.         Console.ReadLine()
  12.     End Sub
  13.  
  14. End Module

Image:Leapyear.jpg

549 Rating: 2.2/5 (5 votes cast)