Point.GetHashCode 方法

定義

傳回這個 Point 的雜湊程式碼。

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

傳回

Int32

這個 Point 結構的雜湊程式碼。

範例

下列範例示範如何取得 結構的 Point 雜湊程式碼。

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

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

    return returnHashCode;
}

適用於