ForEachEnumeratorInfos.Item[Object] Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne un ForEachEnumeratorInfo objet de la collection.
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
Paramètres
- index
- Object
Le nom, l’ID ou l’index de l’objet à retourner depuis la collection.
Valeur de propriété
Objet ForEachEnumeratorInfo.
Exemples
L’exemple de code suivant récupère un élément de la collection par index et nom, en utilisant la feInfos[0] syntaxe.
Note
Pour utiliser l’exemple de code suivant avec un lieu autre que l’anglais, changez la chaîne « For Each Item Enumerator » par le nom localisé de l’énumérateur.
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);
}
}
}
Exemple de sortie :
Description de l’entrée ForEach : Pour chaque Enumerateur de Fichiers
ID de l’entrée ForEach : {62C3D0DC-C6A3-4A08-84F3-6028B2452F41}