System.Delegate.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            return base.Equals(obj);
        }

Usage Example

Beispiel #1
0
        private bool InvocationListEquals(MulticastDelegate d)
        {
            Debug.Assert(d != null);
            Debug.Assert(_invocationList is object[]);
            object[] invocationList = (object[])_invocationList;

            if (d._invocationCount != _invocationCount)
            {
                return(false);
            }

            int invocationCount = (int)_invocationCount;

            for (int i = 0; i < invocationCount; i++)
            {
                Debug.Assert(invocationList[i] is Delegate);
                Delegate dd = (Delegate)invocationList[i]; // If invocationList is an object[], it always contains Delegate (or MulticastDelegate) objects

                object[] dInvocationList = (d._invocationList as object[]) !;
                if (!dd.Equals(dInvocationList[i]))
                {
                    return(false);
                }
            }
            return(true);
        }
All Usage Examples Of System.Delegate::Equals