src/Rukbat/Common/Gimela.Rukbat.DomainModels/Base/BaseObject.cs
/// <summary>
/// Compares the current instance with another object of the same 
/// type and returns an integer that indicates whether the current instance precedes, 
/// follows, or occurs in the same position in the sort order as the other object.
/// </summary>
/// <param name="obj">An object to compare with this instance.</param>
/// <returns>
/// A 32-bit signed integer that indicates the relative order of 
/// the objects being compared. The return value has these meanings:
/// Value
/// Meaning
/// Less than zero
/// This instance is less than <paramref name="obj"/>.
/// Zero
/// This instance is equal to <paramref name="obj"/>.
/// Greater than zero
/// This instance is greater than <paramref name="obj"/>.
/// </returns>
/// <exception cref="T:System.ArgumentException">
/// 	<paramref name="obj"/> is not the same type as this instance.
/// </exception>
Compares the current instance with another object of the same
type and returns an integer that indicates whether the current instance precedes,
follows, or occurs in the same position in the sort order as the other object.
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes follows or occurs in the same position in the sort order as the other object .
public virtual int CompareTo(object obj)
    {
      if (obj is BaseObject)
      {
        BaseObject other = (BaseObject)obj;
        return this.Name.CompareTo(other.Name);
      }
      else
      {
        throw new ArgumentException("The target object is not a <ObjectBase>.");
      }
    }
public virtual int CompareTo ( object obj ) { if ( obj is BaseObject ) { BaseObject other = ( BaseObject ) obj ; return this . Name . CompareTo ( other . Name ) ; } else { throw new ArgumentException ( " " ) ; } }
Compares the current instance with another object of the same
type and returns an integer that indicates whether the current instance precedes,
follows, or occurs in the same position in the sort order as the other object.
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes follows or occurs in the same position in the sort order as the other object .
// 小于零 此实例小于 obj。  // 零 此实例等于 obj。  // 大于零 此实例大于 obj。 // 根据名称进行比较
A 32-bit signed integer that indicates the relative order of
the objects being compared. The return value has these meanings:
Value
Meaning
Less than zero
This instance is less than .
Zero
This instance is equal to .
Greater than zero
This instance is greater than .
A 32 - bit signed integer that indicates the relative order of the objects being compared . The return value has these meanings : Value Meaning Less than zero This instance is less than . Zero This instance is equal to . Greater than zero This instance is greater than .
None
obj
object
An object to compare with this instance.
An object to compare with this instance .