System.Configuration.ApplicationSettingsBase.SettingChanging Event

Occurs before the value of an application settings property is changed.


public event SettingChangingEventHandler SettingChanging


The ApplicationSettingsBase.SettingChanging event occurs before an application setting value property is changed through the ApplicationSettingsBase.Item(string) method. This event is not raised when the ApplicationSettingsBase.Reload or ApplicationSettingsBase.Reset methods are called. ApplicationSettingsBase.SettingChanging can be canceled through the System.Configuration.SettingChangingEventArgs event data class.

You typically use the ApplicationSettingsBase.SettingChanging event to handle immediate validation of an individual settings property. For more information about validation, see How to: Validate Application Settings.

There is no corresponding SettingChanged event for this class; instead, see the ApplicationSettingsBase.PropertyChanged event.


Namespace: System.Configuration
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0