This documentation is archived and is not being maintained.

DiscoveryClientDocumentCollection.Values Property

Gets an System.Collections.ICollection object with all the values in the DiscoveryClientDocumentCollection.

[Visual Basic]
Public ReadOnly Property Values As ICollection
[C#]
public ICollection Values {get;}
[C++]
public: __property ICollection* get_Values();
[JScript]
public function get Values() : ICollection;

Property Value

An ICollection containing the values in the DiscoveryClientDocumentCollection.

Example

[Visual Basic, C#, C++] The following code example outputs the values within the DiscoveryClientDocumentCollection to the console.

[Visual Basic] 
' 'Values' in the collection are retrieved.
Dim myCollection1 As ICollection = myDiscoveryClientDocumentCollection.Values
Dim myObjectCollection1(myDiscoveryClientDocumentCollection.Count-1) As Object
myCollection1.CopyTo(myObjectCollection1, 0)
Console.WriteLine("The objects in the collection are :")
For iIndex = 0 To myObjectCollection1.Length - 1
   Console.WriteLine(myObjectCollection1(iIndex))
Next iIndex 

[C#] 
// 'Values' in the collection are retrieved.
ICollection myCollection1 = myDiscoveryClientDocumentCollection.Values;
object[] myObjectCollection1 = 
               new object[myDiscoveryClientDocumentCollection.Count];
myCollection1.CopyTo(myObjectCollection1, 0);
Console.WriteLine("The objects in the collection are :");
for (int iIndex=0; iIndex < myObjectCollection1.Length; iIndex++)
   Console.WriteLine(myObjectCollection1[iIndex]);

[C++] 
// 'Values' in the collection are retrieved.
ICollection* myCollection1 = myDiscoveryClientDocumentCollection->Values;
Object* myObjectCollection1[] = new Object*[myDiscoveryClientDocumentCollection->Count];
myCollection1->CopyTo(myObjectCollection1, 0);
Console::WriteLine(S"The objects in the collection are :");
for (int iIndex=0; iIndex < myObjectCollection1->Length; iIndex++)
   Console::WriteLine(myObjectCollection1->Item[iIndex]);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter 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

DiscoveryClientDocumentCollection Class | DiscoveryClientDocumentCollection Members | System.Web.Services.Discovery Namespace | Values

Show: