Mega Code Archive

 
Categories / VB.Net / Date Time
 

Returns a value indicating whether this instance is equal to the specified DateTime instance

Imports System Module Application     Sub Main()         Dim one As DateTime = DateTime.UtcNow         Dim two As DateTime = DateTime.Now         Dim three As DateTime = one         Dim result As Boolean = one.Equals(two)         Console.WriteLine("The result of comparing DateTime object one and two is: {0}.", result)         result = one.Equals(three)         Console.WriteLine("The result of comparing DateTime object one and three is: {0}.", result)     End Sub End Module