TransformerInfoCollection.Item[Int32] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定在指定索引位置的 TagMapInfo 物件。
public:
property System::Web::Configuration::TransformerInfo ^ default[int] { System::Web::Configuration::TransformerInfo ^ get(int index); void set(int index, System::Web::Configuration::TransformerInfo ^ value); };
public System.Web.Configuration.TransformerInfo this[int index] { get; set; }
member this.Item(int) : System.Web.Configuration.TransformerInfo with get, set
Default Public Property Item(index As Integer) As TransformerInfo
參數
- index
- Int32
集合中 TransformerInfo 物件的索引。
屬性值
位於指定索引處的 TransformerInfo 物件;如果該索引處沒有任何物件,則為 null
。
範例
下列程式碼範例示範如何使用 Item[] 屬性。 此程式碼範例是針對 類別提供的較大範例的 WebPartsSection 一部分。
// Show all TransformerInfo objects in the collection.
for (int ti = 0;
ti < webPartsSection.Personalization.Providers.Count; ti++)
{
Console.WriteLine(" #{0} Name={1} Type={2}", ti,
webPartsSection.Transformers[ti].Name,
webPartsSection.Transformers[ti].Type);
}
' Show all TransformerInfo objects in the collection.
Dim ti As Integer
For ti = 0 To webPartsSection.Personalization.Providers.Count - 1
Console.WriteLine(" #{0} Name={1} Type={2}", ti, _
webPartsSection.Transformers(ti).Name, _
webPartsSection.Transformers(ti).Type)
Next
備註
如果物件已經存在,則 Item[Int32] 屬性會 TransformerInfo 覆寫物件,否則會建立新的 物件並新增至集合。