// equals returns true IIF the delegate is not null and has the // same target, method and invocation list as this object /// <include file='doc\MulticastDelegate.uex' path='docs/doc[@for="MulticastDelegate.Equals"]/*' /> public override sealed bool Equals(Object obj) { if (!base.Equals(obj)) { return(false); } if (_prev != null) { return(_prev.InvocationListEquals(((MulticastDelegate)obj)._prev)); } else { // if we got here, "this" is a Multicast with only one listener. if (obj is MulticastDelegate) { return(((MulticastDelegate)obj)._prev == null); } else if (obj is Delegate) { return(true); } else { return(false); } } }