示例#1
0
        public int Compare(object x, object y)
        {
            PhotoDirectoryKey key  = (PhotoDirectoryKey)x;
            PhotoDirectoryKey key2 = (PhotoDirectoryKey)y;

            return(key.Name.CompareTo(key2.Name));
        }
示例#2
0
        /// <summary>
        /// Compares two objects and returns a value indicating whether one is less than,
        /// equal to or greater than the other.
        /// </summary>
        /// <param name="x">First object to compare. </param>
        /// <param name="y">Second object to compare. </param>
        /// <returns>Less than zero if x is less than y, zero if x is equal to y or greater than zero if y is greater than x.</returns>
        public int Compare(object x, object y)
        {
            PhotoDirectoryKey dirX = (PhotoDirectoryKey)x;
            PhotoDirectoryKey dirY = (PhotoDirectoryKey)y;

            return(dirX.Name.CompareTo(dirY.Name));
        }