Task_LastEdited.Compare Method

public int Task_LastEdited.Compare(Task x, Task y)
Namespace: yaTDL.Comparer

Description

Compares the LastEdited property of two Task-objects using the System.DateTime.Compare Method.

Return value:

greater than zero y has been edited more recently than x
zero x is the same y
less than zero x has been edited more recently than asy

Exceptions:

ArgumentException The tasks couldn't be compared

Remarks

If you take a look at the source of this method, you will see that the method does not return System.DateTime.Compare(x,y) but System.DateTime.Compare(y,x). The two parameters have been switched to make sure the list that is sorted with this method is sorted correctly.

Last edited Aug 16, 2009 at 7:39 PM by apoll0, version 2

Comments

No comments yet.