TriangleElement.TriangleElementClass.IsEqual C# (CSharp) Метод

IsEqual() публичный Метод

public IsEqual ( IClone other ) : bool
other IClone
Результат bool
    public bool IsEqual(IClone other)
    {
      //1. make sure that the 'other' object is pointing to a valid object
      if (null == other)
        throw new COMException("Invalid object.");

      //2. verify the type of 'other'
      if (!(other is TriangleElementClass))
        throw new COMException("Bad object type.");

      TriangleElementClass otherTriangle = (TriangleElementClass)other;
      //test that all of the object's properties are the same.
      //please note the usage of IsEqual when using ArcObjects components that
      //supports cloning
      if (otherTriangle.Name == m_elementName &&
          otherTriangle.Type == m_elementType &&
          otherTriangle.AutoTransform == m_autoTrans &&
          otherTriangle.ReferenceScale == m_scaleRef &&
          otherTriangle.Angle == m_rotation &&
          otherTriangle.Size == m_size &&
          otherTriangle.AnchorPoint == m_anchorPointType &&
          ((IClone)otherTriangle.Geometry).IsEqual((IClone)m_triangle) &&
          ((IClone)otherTriangle.FillSymbol).IsEqual((IClone)m_fillSymbol) &&
          ((IClone)otherTriangle.SpatialReference).IsEqual((IClone)m_nativeSR))
        return true;

      return false;
    }