Option Strict On
Public Class DateMembers
Public Shared Sub Main()
Dim dat As Date = New Date(2000, 1, 1)
Dim ts As New TimeSpan(30, 0, 0, 0)
Console.WriteLine("The original date is " & dat)
dat = dat.AddMonths(5)
Console.WriteLine("The new date is " & dat)
dat = dat + ts
Console.WriteLine("The new date is " & dat)
End Sub
End Class
|