This documentation is archived and is not being maintained.
DiscoveryClientReferenceCollection.Contains Method
.NET Framework 1.1
Determines if the DiscoveryClientReferenceCollection contains a DiscoveryReference with the specified URL.
[Visual Basic] Public Function Contains( _ ByVal url As String _ ) As Boolean [C#] public bool Contains( string url ); [C++] public: bool Contains( String* url ); [JScript] public function Contains( url : String ) : Boolean;
Parameters
- url
- The URL for the DiscoveryReference to locate within the DiscoveryClientReferenceCollection.
Return Value
true if the DiscoveryClientReferenceCollection contains a DiscoveryReference with the specified URL; otherwise, false.
Example
[Visual Basic] Dim myStringUrl1 As String = "http://localhost/dataservice.disco" If myDiscoveryClientReferenceCollection.Contains(myStringUrl1) Then Console.WriteLine("The document reference {0} is part of the" + _ " collection.", myStringUrl1) End If [C#] string myStringUrl1 = "http://localhost/dataservice.disco"; if (myDiscoveryClientReferenceCollection.Contains(myStringUrl1)) { Console.WriteLine("The document reference {0} is part of the" + " collection.", myStringUrl1); } [C++] String* myStringUrl1 = S"http://localhost/dataservice.disco"; if (myDiscoveryClientReferenceCollection->Contains(myStringUrl1)) { Console::WriteLine(S"The document reference {0} is part of the collection.", myStringUrl1); }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
DiscoveryClientReferenceCollection Class | DiscoveryClientReferenceCollection Members | System.Web.Services.Discovery Namespace
Show: