共用方式為


EndpointAddress.Inequality(EndpointAddress, EndpointAddress) 運算子

定義

傳回值,這個值會指出指定的端點位址是否不相等。

public:
 static bool operator !=(System::ServiceModel::EndpointAddress ^ address1, System::ServiceModel::EndpointAddress ^ address2);
public static bool operator != (System.ServiceModel.EndpointAddress address1, System.ServiceModel.EndpointAddress address2);
static member op_Inequality : System.ServiceModel.EndpointAddress * System.ServiceModel.EndpointAddress -> bool
Public Shared Operator != (address1 As EndpointAddress, address2 As EndpointAddress) As Boolean

參數

address1
EndpointAddress

正在比較的其中一個 EndpointAddress 物件。

address2
EndpointAddress

正在比較的其中一個 EndpointAddress 物件。

傳回

如果端點位址不是相等的,則為 true,否則為 false

範例

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

bool op_Inequality_val = (endpointAddress1 != endpointAddress2);

備註

這個運算子 EndpointAddress.Equals 的對等方法是 。

適用於