EndpointAddress.Equals(Object) 方法

定义

返回一个值,该值指示指定的对象与当前终结点地址是否相等。

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

参数

obj
Object

要与当前终结点地址进行比较的 Object

返回

Boolean

如果指定的对象与当前地址相等,则为 true;否则为 false

示例

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

bool isEqual = endpointAddress.Equals(endpointAddress);

适用于