共用方式為


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);

適用於