Useless question I guess, but accessing the property DateAndTime.Now computes each time the current system date and time, I suppose, is that right?
Thus it would be just a liiiiiittle better to favor:
Dim rightNow As Date = Now
For i As Integer = 0 To 1000
If expiration < rightNow Then
' ...
End If
Next
Over
For i As Integer = 0 To 1000
If expiration < Now() Then
' ...
End If
Next
Am I right?
DateTime.Now does a lot of processing:
It converts the utcNow to your local time. Because of the this calling is expensive. Depending on your requirements, the first sample will give you better performance.