Aracılığıyla paylaş


TagMapCollection.Item[Int32] Özellik

Tanım

Nesneyi belirtilen dizin konumunda alır veya ayarlar TagMapInfo .

public:
 property System::Web::Configuration::TagMapInfo ^ default[int] { System::Web::Configuration::TagMapInfo ^ get(int index); void set(int index, System::Web::Configuration::TagMapInfo ^ value); };
public System.Web.Configuration.TagMapInfo this[int index] { get; set; }
member this.Item(int) : System.Web.Configuration.TagMapInfo with get, set
Default Public Property Item(index As Integer) As TagMapInfo

Parametreler

index
Int32

Koleksiyondaki bir TagMapInfo nesnenin dizini.

Özellik Değeri

TagMapInfo

TagMapInfo Belirtilen dizindeki nesne veya null bu dizinde nesne yoksa.

Örnekler

Aşağıdaki kod örneği özelliğinin Item[] nasıl kullanılacağını gösterir. Bu örnek, sınıfı için PagesSection sağlanan daha büyük bir örneğin bir parçasıdır.

// Get all current TagMappings in the collection.
for (int i = 0; i < pagesSection.TagMapping.Count; i++)
{
  Console.WriteLine("TagMapping {0}:", i);
  Console.WriteLine("  TagTypeName = '{0}'",
      pagesSection.TagMapping[i].TagType);
  Console.WriteLine("  MappedTagTypeName = '{0}'",
      pagesSection.TagMapping[i].MappedTagType);
}
' Get all current TagMappings in the collection.
Dim k As Int32
For k = 1 To pagesSection.TagMapping.Count
  Console.WriteLine("TagMapping {0}:", i)
  Console.WriteLine("  TagTypeName = '{0}'", _
   pagesSection.TagMapping(k).TagType)
  Console.WriteLine("  MappedTagTypeName = '{0}'", _
   pagesSection.TagMapping(k).MappedTagType)
Next

Açıklamalar

Belirtilen dizinde bir TagMapInfo nesne zaten varsa, bu özellik bunun üzerine yazar; aksi takdirde, yeni bir nesne oluşturur ve koleksiyona ekler.

Şunlara uygulanır

Ayrıca bkz.