public override bool Equals(StackItem other) { if (ReferenceEquals(this, other)) { return(true); } if (ReferenceEquals(null, other)) { return(false); } InteropInterface i = other as InteropInterface; if (i == null) { return(false); } return(_object.Equals(i._object)); }