Module Example
Public Sub Main()
Dim localDate As Date = DateTime.SpecifyKind(#03/14/2010 2:30AM#, DateTimeKind.Local)
Dim binLocal As Long = localDate.ToBinary()
If TimeZoneInfo.Local.IsInvalidTime(localDate) Then
Console.WriteLine("{0} is an invalid time in the {1} zone.",localDate, TimeZoneInfo.Local.StandardName)
End If
Dim localDate2 As Date = DateTime.FromBinary(binLocal)
Console.WriteLine("{0} = {1}: {2}",localDate, localDate2, localDate.Equals(localDate2))
End Sub
End Module