EndpointAddress.Equality(EndpointAddress, EndpointAddress) 运算符
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示指定的终结点地址是否不相等。
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的等效方法是 。