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"); } }
public override bool Equals(object obj) { FileContainer fcObj = obj as FileContainer; return(fcObj != null?FullPath.Equals(fcObj.FullPath, StringComparison.CurrentCultureIgnoreCase) : false); }