Linguaggio

ForEachEnumeratorInfos.Item[Object] Proprietà

Definizione

Restituisce un ForEachEnumeratorInfo oggetto dalla collezione.

public:
 property Microsoft::SqlServer::Dts::Runtime::ForEachEnumeratorInfo ^ default[System::Object ^] { Microsoft::SqlServer::Dts::Runtime::ForEachEnumeratorInfo ^ get(System::Object ^ index); };
public Microsoft.SqlServer.Dts.Runtime.ForEachEnumeratorInfo this[object index] { get; }
member this.Item(obj) : Microsoft.SqlServer.Dts.Runtime.ForEachEnumeratorInfo
Default Public ReadOnly Property Item(index As Object) As ForEachEnumeratorInfo

Parametri

index
Object

Il nome, l'ID o l'indice dell'oggetto da restituire dalla collezione.

Valore della proprietà

Un oggetto ForEachEnumeratorInfo.

Esempio

Il seguente esempio di codice recupera un elemento dalla collezione tramite indice e nome, utilizzando la feInfos[0] sintassi.

Note

Per utilizzare il seguente esempio di codice con una località diversa dall'inglese, cambia la stringa "For Each Item Enumerator" con il nome localizzato dell'enumeratore.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace TaskInfos_Item  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            ForEachEnumeratorInfos feInfos = app.ForEachEnumeratorInfos;  

            //Using the Item method syntax of [x], obtain the   
            //description of the first entry.  
            ForEachEnumeratorInfo feInfo = feInfos[0];  
            String nameOfFirstItem = feInfos[0].Name;  
            Console.WriteLine("Description of ForEach entry: {0}", nameOfFirstItem);  

            //Using the Item method syntax of [x], obtain the ID  
            // of the entry with the name, For Each Item Enumerator.  
            feInfo = feInfos["For Each Item Enumerator"];  
            String IDOfItem = feInfos["For Each Item Enumerator"].ID;  
            Console.WriteLine("ID of ForEach entry: {0}", IDOfItem);  
        }  
    }  
}  

Output di esempio:

Descrizione della voce ForEach : Per ogni Enumeratore di File

ID della voce ForEach : {62C3D0DC-C6A3-4A08-84F3-6028B2452F41}

Si applica a