StringInfo.GetHashCode 方法

定义

计算当前 StringInfo 对象的值的哈希代码。Calculates a hash code for the value of the current StringInfo object.

public:
 override int GetHashCode();
public override int GetHashCode ();
[System.Runtime.InteropServices.ComVisible(false)]
public override int GetHashCode ();
override this.GetHashCode : unit -> int
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

返回

Int32

基于此 StringInfo 对象的字符串值的 32 位带符号整数哈希代码。A 32-bit signed integer hash code based on the string value of this StringInfo object.

属性

注解

的行为 GetHashCode 依赖于其实现,该实现可能会从公共语言运行时的一个版本更改为另一个版本。The behavior of GetHashCode is dependent on its implementation, which might change from one version of the common language runtime to another. 这样做可能会提高的性能 GetHashCodeThis might happen to improve the performance of GetHashCode. 若要使行为保持 GetHashCode 不变,应用程序应将的运行时实现重写,使其 GetHashCode 具有一个不会更改的已知实现。To make the behavior of GetHashCode constant, the application should override the runtime implementation of GetHashCode with an implementation known to never change.

适用于

另请参阅