TaskItem.Properties プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
クラスの IDictionary メンバーを取得します。
public:
property System::Collections::IDictionary ^ Properties { System::Collections::IDictionary ^ get(); };
public System.Collections.IDictionary Properties { get; }
member this.Properties : System.Collections.IDictionary
Public ReadOnly Property Properties As IDictionary
プロパティ値
IDictionaryクラスのメンバー。
例
次の例では、 オブジェクトを MethodTaskItem 作成し、ディクショナリを設定します。 トレース リスナーの出力は次のとおりです。
Dumping MTI dictionary
One First
two second
three third
MethodTaskItem mti = GetMTI("NavData",
"Navigate Demo with Data",
sDemoCat);
IDictionary dic = mti.Properties;
Trace.WriteLine("Dumping MTI dictionary");
foreach (DictionaryEntry de in dic)
Trace.WriteLine(de.Key.ToString() + " " + de.Value.ToString());
items.Add(mti);
MethodTaskItem GetMTI(string methodName, string menu, string category) {
MethodTaskItem mti = new MethodTaskItem(methodName, menu, category);
IDictionary d = mti.Properties;
d.Add("One", "First");
d.Add("two", "second");
d.Add("three", "third");
return mti;
}
注釈
ディクショナリを使用して、タスク アイテムに関連付けられているキーと値のペアを格納できます。 Propertiesディクショナリは オブジェクトですSystem.Collections.Specialized.HybridDictionary。