Επεξεργασία

Κοινή χρήση μέσω


LocalFileSettingsProvider.Reset(SettingsContext) Method

Definition

Resets all application settings properties associated with the specified application to their default values.

public:
 virtual void Reset(System::Configuration::SettingsContext ^ context);
public void Reset (System.Configuration.SettingsContext context);
abstract member Reset : System.Configuration.SettingsContext -> unit
override this.Reset : System.Configuration.SettingsContext -> unit
Public Sub Reset (context As SettingsContext)

Parameters

context
SettingsContext

A SettingsContext describing the current application usage.

Implements

Exceptions

A user-scoped setting was encountered but the current configuration only supports application-scoped settings.

Remarks

The Reset method restores the stored values of the specified application settings group. The action of Reset depends on the scope of the application settings property:

  • Application-scoped settings are not affected.

  • User-scoped settings are reset to the default values that are stored as read-only entries in the application configuration file, application.exe.config. If roaming profiles are being used, any application settings values in the roaming profile take precedence over duplicates found in the local profile.

Notice that if roaming profiles are used, there can be two user.config files, one for the local settings and one for the roaming profile.

Applies to

See also