DiscoveryClientResultCollection.Item Property

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

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

public:
property DiscoveryClientResult^ default [int] {
	DiscoveryClientResult^ get (int i);
	void set (int i, DiscoveryClientResult^ value);
}
/** @property */
public DiscoveryClientResult get_Item (int i)

/** @property */
public void set_Item (int i, DiscoveryClientResult value)

Not applicable.

Parameters

i

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

Property Value

The DiscoveryClientResult at the specified index.

Exception typeCondition

ArgumentOutOfRangeException

i is not a valid index in the DiscoveryClientResultCollection.

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

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

for (int i = 0; i < myDiscoveryClientResultCollection.get_Count();
    i++) {
    DiscoveryClientResult myClientResult = 
        myDiscoveryClientResultCollection.get_Item(i);

    Console.WriteLine("DiscoveryClientResult " + (i + 1));
    Console.WriteLine("Type of reference in the discovery "
        + "document: " 
        + myClientResult.get_ReferenceTypeName());
    Console.WriteLine("Url for reference:" 
        + myClientResult.get_Url());
    Console.WriteLine("File for saving the reference: " 
        + myClientResult.get_Filename());
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: