public int Compare(object x, object y) { HackerPost hx = (HackerPost)x; HackerPost hy = (HackerPost)y; return(hx.title.CompareTo(hy.title)); }
public int Compare(object x, object y) { HackerPost hx = (HackerPost)x; HackerPost hy = (HackerPost)y; if (hx.score < hy.score) { return(1); } else if (hx.score > hy.score) { return(-1); } else { return(0); } }