LocalFileSettingsProvider.Reset Method (SettingsContext)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Configuration
Assembly:  System (in System.dll)

public void Reset(
	SettingsContext context
)

Parameters

context
Type: System.Configuration.SettingsContext

A SettingsContext describing the current application usage.

Exception Condition
ConfigurationErrorsException

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

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.

.NET Framework
Available since 2.0
Return to top
Show: