語言

Point.GetHashCode 方法

定義

回傳此 Point的雜湊碼。

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

傳回

這個結構的 Point 雜湊碼。

範例

以下範例說明如何取得結構的 Point 雜湊碼。

private int getHashCodeExample()
{
    
    Point point1 = new Point(10, 5);

    // Get the hashcode of a Point structure
    int returnHashCode = point1.GetHashCode();

    return returnHashCode;
}

適用於