There is DateDiff() function in VB.NET but which function is equivalent to it in c#?
I m facing problem in converting this vb.net code to c#
Private LastPointWhenClicked As Point
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If LastPoint = Cursor.Position AndAlso LastPointWhenClicked <> Cursor.Position Then
If DateDiff(DateInterval.Second, LastTimeMoved, Now) >= 2 Then
LastPoint = New Point(Integer.MinValue, Integer.MinValue)
LastPointWhenClicked = Cursor.Position
End If
Else
LastPoint = Cursor.Position
LastTimeMoved = Now
End If
End Sub