CodeAccessPermission.GetHashCode 方法

定义

获取 CodeAccessPermission 对象的哈希代码,此代码适合在哈希算法和数据结构(例如哈希表)中使用。Gets a hash code for the CodeAccessPermission object that is suitable for use in hashing algorithms and data structures such as a hash table.

public:
 override int GetHashCode();
[System.Runtime.InteropServices.ComVisible(false)]
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

返回

当前 CodeAccessPermission 对象的哈希代码。A hash code for the current CodeAccessPermission object.

属性

注解

同一权限的两个实例的哈希代码可能不同,因此,不应使用哈希代码来比较两个 CodeAccessPermission 的对象。The hash code for two instances of the same permission might be different, hence a hash code should not be used to compare two CodeAccessPermission objects.

适用于