Aracılığıyla paylaş


ProfilePropertySettingsCollection.Add(ProfilePropertySettings) Yöntem

Tanım

Koleksiyona bir ProfilePropertySettings nesne ekler.

public:
 void Add(System::Web::Configuration::ProfilePropertySettings ^ propertySettings);
public void Add (System.Web.Configuration.ProfilePropertySettings propertySettings);
member this.Add : System.Web.Configuration.ProfilePropertySettings -> unit
Public Sub Add (propertySettings As ProfilePropertySettings)

Parametreler

propertySettings
ProfilePropertySettings

ProfilePropertySettings Koleksiyona eklenecek nesne.

Özel durumlar

ProfilePropertySettings Eklenecek nesne koleksiyonda zaten var veya koleksiyon salt okunur.

Örnekler

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

// Add a new PropertySettings to the group.
ProfilePropertySettings newProp = new ProfilePropertySettings("AvatarImage");
newProp.Type = "System.String, System.dll";
newPropGroup.PropertySettings.Add(newProp);
' Add a new PropertySettings to the group.
Dim newProp As ProfilePropertySettings = new ProfilePropertySettings("AvatarImage")
newProp.Type = "System.String, System.dll"
newPropGroup.PropertySettings.Add(newProp)

Açıklamalar

Koleksiyon aynı ada sahip bir ProfilePropertySettings nesne içermemelidir.

Şunlara uygulanır

Ayrıca bkz.