ProfileSettingsCollection.Add(ProfileSettings) 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 ProfileSettings oggetto all'insieme.
public:
void Add(System::Web::Configuration::ProfileSettings ^ profilesSettings);
public void Add(System.Web.Configuration.ProfileSettings profilesSettings);
member this.Add : System.Web.Configuration.ProfileSettings -> unit
Public Sub Add (profilesSettings As ProfileSettings)
Parametri
- profilesSettings
- ProfileSettings
Oggetto ProfileSettings da aggiungere all'insieme.
Eccezioni
L'oggetto ProfileSettings da aggiungere esiste già nell'insieme oppure 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 HealthMonitoringSection classe .
// Get the current Enabled property value.
Boolean enabledValue = healthMonitoringSection.Enabled;
// Set the Enabled property to false.
healthMonitoringSection.Enabled = false;
' Get the current Enabled property value.
Dim enabledValue As Boolean = healthMonitoringSection.Enabled
' Set the Enabled property to False.
healthMonitoringSection.Enabled = False
Commenti
L'insieme non deve contenere già un ProfileSettings oggetto con lo stesso nome.