Поделиться через


Delegate.GetHashCode Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns a hash code for the delegate.

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

Syntax

'Declaration
Public Overrides Function GetHashCode As Integer
public override int GetHashCode()

Return Value

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

Exceptions

Exception Condition
MethodAccessException

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

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.