Point3D.GetHashCode 方法

定义

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

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

返回

Point3D 结构的哈希代码。A hash code for this Point3D structure.

示例

下面的示例演示如何获取Point3D结构的哈希代码。The following example shows how to get the hash code of a Point3D structure.

// Gets the hashcode of a Point4D structure

Point4D point1 = new Point4D(10, 5, 1, 4);
int pointHashCode;

pointHashCode = point1.GetHashCode();

// Displaying Results
syntaxString = "pointHashCode = point1.GetHashCode();";
resultType = "int";
operationString = "Getting the hashcode of Point4D";
ShowResults(pointHashCode.ToString(), syntaxString, resultType, operationString);
' Gets the hashcode of a Point4D structure

Dim point1 As New Point4D(10, 5, 1, 4)
Dim pointHashCode As Integer

pointHashCode = point1.GetHashCode()

' Displaying Results
syntaxString = "pointHashCode = point1.GetHashCode()"
resultType = "int"
operationString = "Getting the hashcode of Point4D"
ShowResults(pointHashCode.ToString(), syntaxString, resultType, operationString)

适用于