예제 #1
0
        public int Compare(object x, object y)
        {
            HackerPost hx = (HackerPost)x;
            HackerPost hy = (HackerPost)y;

            return(hx.title.CompareTo(hy.title));
        }
예제 #2
0
        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);
            }
        }