EventMappingSettingsCollection.Insert(Int32, EventMappingSettings) Yöntem

Tanım

Belirtilen EventMappingSettings nesneyi koleksiyondaki belirtilen dizin noktasına ekler.

public:
 void Insert(int index, System::Web::Configuration::EventMappingSettings ^ eventMappingSettings);
public void Insert(int index, System.Web.Configuration.EventMappingSettings eventMappingSettings);
member this.Insert : int * System.Web.Configuration.EventMappingSettings -> unit
Public Sub Insert (index As Integer, eventMappingSettings As EventMappingSettings)

Parametreler

index
Int32

Koleksiyondaki bir nesnenin geçerli dizini EventMappingSettings .

eventMappingSettings
EventMappingSettings

EventMappingSettings Koleksiyona eklenecek nesne.

Özel durumlar

EventMappingSettings Eklenecek nesne koleksiyonda zaten var, dizin geçersiz veya koleksiyon salt okunur.

Örnekler

Aşağıdaki kod örneği, Insert yönteminin nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için HealthMonitoringSection sağlanan daha büyük bir örneğin parçasıdır.

// Insert an EventMappingsSettings object into the EventMappings collection property.
healthMonitoringSection.EventMappings.Insert(1, 
    new EventMappingSettings("HeartBeats", "", 1, 2));
' Insert an EventMappingsSettings object into the EventMappings collection property.
healthMonitoringSection.EventMappings.Insert(1, _
    new EventMappingSettings("HeartBeats", "", 1, 2))

Açıklamalar

Dizin parametresi koleksiyondaki öğe sayısına eşitse, giriş koleksiyonun sonuna eklenir.

Şunlara uygulanır

Ayrıca bkz.