Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/mscorlib/src/System/MulticastDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ public override sealed int GetHashCode()
if (IsUnmanagedFunctionPtr())
return ValueType.GetHashCodeOfPtr(_methodPtr) ^ ValueType.GetHashCodeOfPtr(_methodPtrAux);

if (_invocationCount != (IntPtr)0)
{
var t = _invocationList as Delegate;

if (t != null)
{
// this is a secure/wrapper delegate so we need to unwrap and check the inner one
return t.GetHashCode();
}
}

Object[] invocationList = _invocationList as Object[];
if (invocationList == null)
{
Expand Down