TagPrefixCollection.Item[Int32] Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the TagPrefixInfo object at the specified index location.
public:
property System::Web::Configuration::TagPrefixInfo ^ default[int] { System::Web::Configuration::TagPrefixInfo ^ get(int index); void set(int index, System::Web::Configuration::TagPrefixInfo ^ value); };
public System.Web.Configuration.TagPrefixInfo this[int index] { get; set; }
member this.Item(int) : System.Web.Configuration.TagPrefixInfo with get, set
Default Public Property Item(index As Integer) As TagPrefixInfo
- index
- Int32
The index of a TagPrefixInfo object in the collection.
The TagPrefixInfo object at the specified index, or null
if there is no object at that index.
The following code example shows how to use the Item[] property. This code example is part of a larger example provided for the PagesSection class.
// Get all current Controls in the collection.
for (int i = 0; i < pagesSection.Controls.Count; i++)
{
Console.WriteLine("Control {0}:", i);
Console.WriteLine(" TagPrefix = '{0}' ",
pagesSection.Controls[i].TagPrefix);
Console.WriteLine(" TagName = '{0}' ",
pagesSection.Controls[i].TagName);
Console.WriteLine(" Source = '{0}' ",
pagesSection.Controls[i].Source);
Console.WriteLine(" Namespace = '{0}' ",
pagesSection.Controls[i].Namespace);
Console.WriteLine(" Assembly = '{0}' ",
pagesSection.Controls[i].Assembly);
}
' Get all current Controls in the collection.
Dim j As Int32
For j = 0 To pagesSection.Controls.Count - 1
Console.WriteLine("Control {0}:", j)
Console.WriteLine(" TagPrefix = '{0}' ", _
pagesSection.Controls(j).TagPrefix)
Console.WriteLine(" TagName = '{0}' ", _
pagesSection.Controls(j).TagName)
Console.WriteLine(" Source = '{0}' ", _
pagesSection.Controls(j).Source)
Console.WriteLine(" Namespace = '{0}' ", _
pagesSection.Controls(j).Namespace)
Console.WriteLine(" Assembly = '{0}' ", _
pagesSection.Controls(j).Assembly)
Next
This property overwrites the TagPrefixInfo object if it already exists at the specified index; otherwise, a new object is created and added to the collection.
Producto | Versiones |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: