EndpointAddress.GetHashCode 方法

定义

提供当前终结点地址的唯一哈希代码。

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

返回

当前终结点地址的唯一哈希代码。

示例

EndpointIdentity endpointIdentity =
    EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);
EndpointAddress endpointAddress = new EndpointAddress(
    new Uri
    ("http://localhost:8003/servicemodelsamples/service/incode/identity"),
    endpointIdentity, addressHeaders);

int hashCode = endpointAddress.GetHashCode();

注解

GetHashCode 适用于哈希算法和哈希表等数据结构。

适用于