TransformerInfoCollection.Item Property (Int32)

 

Gets or sets the TagMapInfo object at the specified index location.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public TransformerInfo this[
	int index
] { get; set; }

Parameters

index
Type: System.Int32

The index of a TransformerInfo object in the collection.

Property Value

Type: System.Web.Configuration.TransformerInfo

The TransformerInfo object at the specified index, or null if there is no object at that index.

The Item[Int32] property overwrites the TransformerInfo object if it already exists; otherwise, a new object is created and added to the collection.

The following code example shows how to use the Item property. This code example is part of a larger example provided for the WebPartsSection class.

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

.NET Framework
Available since 2.0
Return to top
Show: