Example #1
0
 public int CompareTo(object obj)
 {
     if (obj is FileContainer)
     {
         FileContainer fc     = obj as FileContainer;
         int           result = FileType.CompareTo(fc.FileType);
         if (result != 0)
         {
             return(result);
         }
         return(FileName.CompareTo(fc.FileName));
     }
     else
     {
         throw new Exception("Wrong type");
     }
 }
Example #2
0
        public override bool Equals(object obj)
        {
            FileContainer fcObj = obj as FileContainer;

            return(fcObj != null?FullPath.Equals(fcObj.FullPath, StringComparison.CurrentCultureIgnoreCase) : false);
        }