SectionInformation.RestartOnExternalChanges Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈