ProfilePropertySettingsCollection.Add(ProfilePropertySettings) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Aggiunge un ProfilePropertySettings oggetto all'insieme.
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)
Parametri
- propertySettings
- ProfilePropertySettings
Oggetto ProfilePropertySettings da aggiungere all'insieme.
Eccezioni
L'oggetto ProfilePropertySettings da aggiungere esiste già nell'insieme o l'insieme è di sola lettura.
Esempio
Nell'esempio di codice seguente viene illustrato come usare il Add metodo . Questo esempio di codice fa parte di un esempio più ampio fornito per la ProfileSection classe .
// 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)
Commenti
L'insieme non deve contenere già un ProfilePropertySettings oggetto con lo stesso nome.