public int CompareTo(object obj) { if (obj == null) { return(1); } OutlookFolder other = obj as OutlookFolder; if (other == null) { throw new ArgumentException(string.Format("Cannot compare {0} with {1}", GetType().ToString(), obj.GetType().ToString())); } return(CompareTo(this, other)); }
internal static int CompareTo(OutlookFolder left, OutlookFolder right) { int _folderNameComparison = left._folderName.CompareTo(right._folderName); if (_folderNameComparison != 0) { return(_folderNameComparison); } int _folderIDComparison = left._folderID.CompareTo(right._folderID); if (_folderIDComparison != 0) { return(_folderIDComparison); } return(left._isDefaultFolder.CompareTo(right._isDefaultFolder)); }
internal static bool Equals(OutlookFolder left, OutlookFolder right) { return((right._folderName == left._folderName) && (right._folderID == left._folderID) && (right._isDefaultFolder == left._isDefaultFolder)); }