Delegate.GetHashCode Method

May 11, 2014

Returns a hash code for the delegate.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public override int GetHashCode()

Return Value

Type: System.Int32
A hash code for the delegate.

ExceptionCondition
MethodAccessException

Application code attempts to access this member late-bound, for example, by using the Type.InvokeMember method.

The return value of this method must not be persisted for two reasons. First, the hash function of a class might be altered to generate a better distribution, rendering any values from the old hash function useless. Second, the default implementation of this class does not guarantee that the same value will be returned by different instances.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft