DiscoveryClientResultCollection.Item[Int32] 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 or sets the DiscoveryClientResult at position i
of the DiscoveryClientResultCollection.
public:
property System::Web::Services::Discovery::DiscoveryClientResult ^ default[int] { System::Web::Services::Discovery::DiscoveryClientResult ^ get(int i); void set(int i, System::Web::Services::Discovery::DiscoveryClientResult ^ value); };
public System.Web.Services.Discovery.DiscoveryClientResult this[int i] { get; set; }
member this.Item(int) : System.Web.Services.Discovery.DiscoveryClientResult with get, set
Default Public Property Item(i As Integer) As DiscoveryClientResult
Parameters
- i
- Int32
The zero-based index of the DiscoveryClientResult to get or set.
Property Value
The DiscoveryClientResult at the specified index.
Exceptions
i
is not a valid index in the DiscoveryClientResultCollection.
Examples
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.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);
}
Dim i As Integer
For i = 0 To myDiscoveryClientResultCollection.Count - 1
Dim myClientResult As DiscoveryClientResult = _
myDiscoveryClientResultCollection(i)
Console.WriteLine("DiscoveryClientResult " & (i + 1).ToString())
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)
Next i
Remarks
This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index]
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기