Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Contains Method
Collapse the table of content
Expand the table of content

DiscoveryClientReferenceCollection.Contains Method

Determines if the DiscoveryClientReferenceCollection contains a DiscoveryReference with the specified URL.

Namespace:  System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

public bool Contains(
	string url
)

Parameters

url
Type: System.String

The URL for the DiscoveryReference to locate within the DiscoveryClientReferenceCollection.

Return Value

Type: System.Boolean
true if the DiscoveryClientReferenceCollection contains a DiscoveryReference with the specified URL; otherwise, false.

string myStringUrl1 = "http://localhost/dataservice.disco";
if (myDiscoveryClientReferenceCollection.Contains(myStringUrl1))
{
    Console.WriteLine("The document reference {0} is part of the"
        + " collection.", myStringUrl1);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft