StringInfo.GetHashCode 方法

定义

计算当前 StringInfo 对象的值的哈希代码。

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

返回

基于此 StringInfo 对象的字符串值的 32 位带符号整数哈希代码。

属性

注解

的行为 GetHashCode 取决于其实现,该实现可能会从公共语言运行时的一个版本更改为另一个版本。 这可能会提高 的性能 GetHashCode。 若要使 的行为 GetHashCode 保持常量,应用程序应使用已知永不更改的实现替代 的 GetHashCode 运行时实现。

适用于

另请参阅