public int CompareTo(Gene other) { if (Source == other.Source) { if (Destination == other.Destination) { return(Strength.CompareTo(other.Strength)); } return(Destination.CompareTo(other.Destination)); } return(Source.CompareTo(other.Source)); }
/// <summary> /// Determines whether this PluginFile is less than, equal to, /// or greater than the given PluginFile. /// </summary> /// <param name="other">The PluginFile to which to compare this PluginFile.</param> /// <returns> /// A value less than 0 if this PluginFile is less than the given PluginFile, /// or 0 if this PluginFile is equal to the given PluginFile, /// or a value greater than 0 if this PluginFile is greater than the given PluginFile. /// </returns> public int CompareTo(PluginFile other) { var intResult = Priority.CompareTo(other.Priority); if (intResult == 0) { intResult = IsFolder.CompareTo(other.IsFolder); if (intResult == 0) { intResult = Source.CompareTo(other.Source); if (intResult == 0) { intResult = Destination.CompareTo(other.Destination); } } } return(intResult); }
public int CompareTo(object obj) { return(Destination.CompareTo(((Path)obj).Destination)); }