Beispiel #1
0
        /// <summary>
        /// Compare
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public int Compare(M3UFile x, M3UFile y)
        {
            if (x != null && y != null)
            {
                int r = string.CompareOrdinal(x.Name, y.Name);
                if (r == 0)
                {
                    r = string.CompareOrdinal(x.Author, y.Author);
                }
                if (r == 0)
                {
                    r = string.CompareOrdinal(x.Email, y.Email);
                }
                return(r);
            }

            return(0);
        }
Beispiel #2
0
 /// <summary>
 /// CompareTo
 /// </summary>
 /// <param name="y"></param>
 /// <returns></returns>
 public int CompareTo(M3UFile y)
 {
     return(y != null?Compare(this, y) : 0);
 }