言語

ForEachEnumeratorInfos.Item[Object] プロパティ

定義

コレクションから ForEachEnumeratorInfo オブジェクトを返します。

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

パラメーター

index
Object

コレクションから返すオブジェクトの名前、ID、インデックス。

プロパティ値

ForEachEnumeratorInfo オブジェクト。

以下のコード例は、 feInfos[0] 構文を用いてインデックスと名前でコレクションからアイテムを取得します。

Note

以下のコードサンプルを英語以外のローカネームで使用する場合は、「For Each Item Enumerator」という文字列をエノメレータのローカライズ名に変更してください。

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);  
        }  
    }  
}  

出力例:

各エントリについての説明:各ファイルエノメレーターごとに

ForEachエントリーのID: {62C3D0DC-C6A3-4A08-84F3-6028B2452F41}

適用対象