共用方式為


EndpointAddress.Equality(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 ( = ) : 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

範例

EndpointAddress endpointAddress = new EndpointAddress(
    new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"), addressHeaders);
EndpointAddress endpointAddress2 = new EndpointAddress(
   new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"), addressHeaders);

if (endpointAddress == endpointAddress2)
    Console.WriteLine("The two endpoint addresses are equal");
else
    Console.WriteLine("The two endpoint addresses are not equal");

備註

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

適用於