src/GenFx/GeneticEntity.cs
/// <summary>
/// Compares the current object with another object.
/// </summary>
/// <param name="obj">An object to compare with this object.</param>
/// <returns>
/// A value that indicates the relative order of the objects being compared. The
/// return value has the following meanings:
///  * Less than zero: This object is less than <paramref name="obj"/>.
///  * Zero: This object is equal to <paramref name="obj"/>
///  * Greater than zero: This object is greater than <paramref name="obj"/>.
///  </returns>
Compares the current object with another object.
Compares the current object with another object .
public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return 1;
            }
            if (!(obj is GeneticEntity entity))
            {
                throw new ArgumentException(StringUtil.GetFormattedString(
                    Resources.ErrorMsg_ObjectIsWrongType, typeof(GeneticEntity)), nameof(obj));
            }
            return this.CompareTo(entity);
        }
public int CompareTo ( object obj ) { if ( obj == null ) { return 1 ; } if ( ! ( obj is GeneticEntity entity ) ) { throw new ArgumentException ( StringUtil . GetFormattedString ( Resources . ErrorMsg_ObjectIsWrongType , typeof ( GeneticEntity ) ) , nameof ( obj ) ) ; } return this . CompareTo ( entity ) ; }
Compares the current object with another object.
Compares the current object with another object .
A value that indicates the relative order of the objects being compared. The
return value has the following meanings:
Less than zero: This object is less than .
Zero: This object is equal to
Greater than zero: This object is greater than .
A value that indicates the relative order of the objects being compared . The return value has the following meanings : Less than zero : This object is less than . Zero : This object is equal to Greater than zero : This object is greater than .
obj
object
An object to compare with this object.
An object to compare with this object .