Aracılığıyla paylaş


ProfileSettingsCollection.Insert(Int32, ProfileSettings) Yöntem

Tanım

Belirtilen ProfileSettings nesneyi koleksiyondaki belirtilen dizine ekler.

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

Parametreler

index
Int32

Koleksiyondaki bir ProfileSettings nesnenin dizini.

authorizationSettings
ProfileSettings

ProfileSettings Koleksiyona eklenecek nesne.

Özel durumlar

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

Örnekler

Aşağıdaki kod örneğinde yönteminin nasıl kullanılacağı gösterilmektedir Insert . 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 ProfileSettings object into the Profiles collection property.
healthMonitoringSection.Profiles.Insert(1, new ProfileSettings("Default2"));
' Insert an ProfileSettings object into the Profiles collection property.
healthMonitoringSection.Profiles.Insert(1, new ProfileSettings("Default2"))

Açıklamalar

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

Şunlara uygulanır

Ayrıca bkz.