public int CompareTo(ConsolePlusTheme other) { int foreCompare = BackgroundColor.CompareTo(other.BackgroundColor); if (foreCompare != 0) { return(foreCompare); } return(ForegroundColor.CompareTo(other.ForegroundColor)); }
/// <summary> /// Compare to /// </summary> /// <param name="other">Other</param> /// <returns>Comparison result</returns> public int CompareTo(BufferCell other) { int ret = Character.CompareTo(other.Character); if (ret == 0) { ret = ForegroundColor.CompareTo(other.ForegroundColor); if (ret == 0) { ret = BackgroundColor.CompareTo(other.BackgroundColor); } } return(ret); }