diff options
Diffstat (limited to 'src/mscorlib/src/System/Delegate.cs')
-rw-r--r-- | src/mscorlib/src/System/Delegate.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mscorlib/src/System/Delegate.cs b/src/mscorlib/src/System/Delegate.cs index de0ff6532c..75ec57a003 100644 --- a/src/mscorlib/src/System/Delegate.cs +++ b/src/mscorlib/src/System/Delegate.cs @@ -179,7 +179,10 @@ namespace System else return unchecked((int)((long)this._methodPtrAux)); */ - return GetType().GetHashCode(); + if (_methodPtrAux.IsNull()) + return ( _target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode(); + else + return GetType().GetHashCode(); } public static Delegate Combine(Delegate a, Delegate b) |