Mega Code Archive

 
Categories / VB.Net by API / System
 

New Date(Int year, Int month, Int day, Int hour, Int minute)

Public Class Tester     Public Shared Sub Main         Dim thirdOfJuly As Date = #7/3/1776 11:59:59 PM#         Dim fourthOfJuly As New Date(1776, 7, 4)         Dim inTheMorning As New Date(1776, 7, 4, 9, 45, 30)         Console.WriteLine( _            "The 3rd and 4th of July, 1776..." & _            vbNewLine & vbNewLine & _            "#7/3/1776 11:59:59 PM# ... " & _            thirdOfJuly.ToString & vbNewLine & _            "New Date(1776, 7, 4) ... " & _            fourthOfJuly.ToString & vbNewLine & _            "New Date(1776, 7, 4, 9, 45, 30) ... " & _            inTheMorning.ToString)     End Sub End Class