Size.GetHashCode 方法

定义

返回此 Size 结构的哈希代码。Returns a hash code for this Size structure.

public:
 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

返回

Int32

一个整数值,指定此 Size 结构的哈希值。An integer value that specifies a hash value for this Size structure.

注解

应避免根据 GetHashCode 唯一值,因为两个对象的 Size 和属性的值相同,因此 Width Height 可能返回相同的哈希代码。You should avoid depending on GetHashCode for unique values, as two Size objects with the same values for their Width and Height properties may return the same hash code. 此行为在将来的版本中可能会更改。This behavior could change in a future release.

适用于