ApplicationSettingsBase.Reload Method

Definition

Refreshes the application settings property values from persistent storage.

C#
public void Reload();

Examples

The following code example shows the Reload method being invoked in the body of the Click event handler for a button named btnReload. As a result of this call, the currently stored values for the application settings are reloaded into their corresponding properties. The full code example is listed in the ApplicationSettingsBase class overview.

C#
private void btnReload_Click(object sender, EventArgs e)
{
    frmSettings1.Reload();
}

Remarks

The Reload method clears the currently cached property values, causing a reload of these values from persistent storage when they are subsequently accessed. This method performs the following actions:

  • It clears the currently cached properties by clearing the collection represented by the PropertyValues property.

  • It raises the PropertyChanged event for every member of the Properties collection.

Reload contrasts with Reset in that the former will load the last set of saved application settings values, whereas the latter will load the saved default values.

Applies to

Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also