System.Configuration.ApplicationSettingsBase.SettingChanging Event

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

Syntax

public event SettingChangingEventHandler SettingChanging

Remarks

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.

Requirements

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