/// <summary>Checks if this instance is equal to the given object.</summary> /// <returns>true if the given object is a SignatureHelper and represents the same signature; otherwise, false.</returns> /// <param name="obj">The object with which this instance should be compared. </param> public override bool Equals(object obj) { SignatureHelper signatureHelper = obj as SignatureHelper; if (signatureHelper == null) { return(false); } if (signatureHelper.module != this.module || signatureHelper.returnType != this.returnType || signatureHelper.callConv != this.callConv || signatureHelper.unmanagedCallConv != this.unmanagedCallConv) { return(false); } if (this.arguments != null) { if (signatureHelper.arguments == null) { return(false); } if (this.arguments.Length != signatureHelper.arguments.Length) { return(false); } for (int i = 0; i < this.arguments.Length; i++) { if (!signatureHelper.arguments[i].Equals(this.arguments[i])) { return(false); } } } else if (signatureHelper.arguments != null) { return(false); } return(SignatureHelper.CompareOK(signatureHelper.modreqs, this.modreqs) && SignatureHelper.CompareOK(signatureHelper.modopts, this.modopts)); }