DiscoveryClientResultCollection.Item[Int32] Property

Definition

Gets or sets the DiscoveryClientResult at position i of the DiscoveryClientResultCollection.

C#
public System.Web.Services.Discovery.DiscoveryClientResult this[int i] { get; set; }

Parameters

i
Int32

The zero-based index of the DiscoveryClientResult to get or set.

Property Value

The DiscoveryClientResult at the specified index.

Exceptions

Examples

C#
for(int i=0; i<myDiscoveryClientResultCollection.Count; i++)
{
   DiscoveryClientResult myClientResult =
       myDiscoveryClientResultCollection[i];
   Console.WriteLine("DiscoveryClientResult "+(i+1));
   Console.WriteLine("Type of reference in the discovery document: "
       + myClientResult.ReferenceTypeName);
   Console.WriteLine("Url for reference:" + myClientResult.Url);
   Console.WriteLine("File for saving the reference: "
       + myClientResult.Filename);
}

Remarks

This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index].

Applies to

Produkt Versiounen
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1