Modifier

Partager via


SectionInformation.RestartOnExternalChanges Property

Definition

Gets or sets a value that specifies whether a change in an external configuration include file requires an application restart.

public:
 property bool RestartOnExternalChanges { bool get(); void set(bool value); };
public bool RestartOnExternalChanges { get; set; }
member this.RestartOnExternalChanges : bool with get, set
Public Property RestartOnExternalChanges As Boolean

Property Value

true if a change in an external configuration include file requires an application restart; otherwise, false. The default is true.

Exceptions

The selected value conflicts with a value that is already defined.

Examples

The following example shows how to get the RestartOnExternalChanges property value of a ConfigurationSection object.

static public void RestartOnExternalChanges()
{
    SectionInformation sInfo =
        GetSectionInformation();

    bool restartOnChange = 
        sInfo.RestartOnExternalChanges;
    Console.WriteLine("Section type: {0}", 
        restartOnChange.ToString());
}
Public Shared Sub RestartOnExternalChanges()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim restartOnChange As Boolean = _
    sInfo.RestartOnExternalChanges
    Console.WriteLine("Section type: {0}", _
    restartOnChange.ToString())

End Sub

Remarks

Set the RestartOnExternalChanges property to false to prevent an application restart when configuration settings in the external include file are modified for this ConfigurationSection object.

Applies to