DiscoveryClientDocumentCollection.Keys Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an ICollection object with all the keys in the DiscoveryClientDocumentCollection.
public:
property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public ReadOnly Property Keys As ICollection
Property Value
An ICollection containing the keys of the DiscoveryClientDocumentCollection.
Examples
The following code example outputs the keys within the DiscoveryClientDocumentCollection to the console.
ICollection^ myCollection = myDiscoveryClientDocumentCollection->Keys;
array<Object^>^myObjectCollection =
gcnew array<Object^>(myDiscoveryClientDocumentCollection->Count);
myCollection->CopyTo( myObjectCollection, 0 );
Console::WriteLine( "The discovery documents in the collection are :" );
for ( int iIndex = 0; iIndex < myObjectCollection->Length; iIndex++ )
Console::WriteLine( myObjectCollection[ iIndex ] );
ICollection myCollection = myDiscoveryClientDocumentCollection.Keys;
object[] myObjectCollection =
new object[myDiscoveryClientDocumentCollection.Count];
myCollection.CopyTo(myObjectCollection, 0);
Console.WriteLine("The discovery documents in the collection are :");
for (int iIndex=0; iIndex < myObjectCollection.Length; iIndex++)
{
Console.WriteLine(myObjectCollection[iIndex]);
}
Dim myCollection As ICollection = myDiscoveryClientDocumentCollection.Keys
Dim myObjectCollection(myDiscoveryClientDocumentCollection.Count-1) As Object
myCollection.CopyTo(myObjectCollection, 0)
Console.WriteLine("The discovery documents in the collection are :")
Dim iIndex As Integer
For iIndex = 0 To myObjectCollection.Length - 1
Console.WriteLine(myObjectCollection(iIndex))
Next iIndex
Applies to
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.