Source/NFX.Erlang/Types/ErlBinary.cs
/// <summary>
/// Compare this instance to the IErlObject.
/// Negative value means that the value is less than obj, positive - greater than the obj
/// </summary>
Compare this instance to the IErlObject.
Negative value means that the value is less than obj, positive - greater than the obj
Compare this instance to the IErlObject . Negative value means that the value is less than obj positive - greater than the obj
public int CompareTo(IErlObject obj)
    {
      if (!(obj is ErlBinary))
        return TypeOrder < obj.TypeOrder ? -1 : 1;
      var rhs = (ErlBinary)obj;
      var n   = m_Value.Length.CompareTo(rhs.Value.Length);
      if (n != 0) return n;
      for (int i = 0; i < m_Value.Length; i++)
        if (m_Value[i] != rhs.Value[i])
          return m_Value[i] < rhs.Value[i] ? -i : i;
      return 0;
    }
public int CompareTo ( IErlObject obj ) { if ( ! ( obj is ErlBinary ) ) return TypeOrder < obj . TypeOrder ? - 1 : 1 ; var rhs = ( ErlBinary ) obj ; var n = m_Value . Length . CompareTo ( rhs . Value . Length ) ; if ( n != 0 ) return n ; for ( int i = 0 ; i < m_Value . Length ; i ++ ) if ( m_Value [ i ] != rhs . Value [ i ] ) return m_Value [ i ] < rhs . Value [ i ] ? - i : i ; return 0 ; }
Compare this instance to the IErlObject.
Compare this instance to the IErlObject .
obj
IErlObject