コード例 #1
0
        public int CompareTo(object obj)
        {
            if (!(obj is SimpleFileInfo))
            {
                throw new ArgumentException("Incorrect type in SimpleCompare.CompareTo!");
            }

            SimpleFileInfo other = (SimpleFileInfo)obj;

            return(FileName.CompareTo(other.FileName) == 0 ? FileLength.CompareTo(other.FileLength) : FileName.CompareTo(other.FileName));
        }
コード例 #2
0
 public int CompareTo(DownloadableImageLink other)
 {
     return(FileLength.CompareTo(other.FileLength));
 }