Size.GetHashCode Size.GetHashCode Size.GetHashCode Size.GetHashCode Method

定義

傳回這個 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

傳回

整數值,指定這個 Size 結構的雜湊值。An integer value that specifies a hash value for this Size structure.

備註

您應該GetHashCode避免視唯一值而定, 因為具有和Height屬性之Width相同值的兩個Size物件可能會傳回相同的雜湊碼。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.

適用於