SectionInformation.InheritInChildApplications 属性    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示在关联配置节中指定的设置是否由驻留在相关应用程序子目录中的应用程序继承。
public:
 property bool InheritInChildApplications { bool get(); void set(bool value); };
	public bool InheritInChildApplications { get; set; }
	member this.InheritInChildApplications : bool with get, set
	Public Property InheritInChildApplications As Boolean
	属性值
如果此 ConfigurationSection 对象中指定的设置是由子应用程序继承的,则为 true;否则为 false。 默认值为 true。
示例
以下示例演示如何获取 InheritInChildApplications 对象的值 ConfigurationSection 。
static public void GetInheritInChildApps()
{
    SectionInformation sInfo =
        GetSectionInformation();
    bool inheritInChildApps =
        sInfo.InheritInChildApplications;
    Console.WriteLine("Inherit in child apps: {0}",
        inheritInChildApps.ToString());
}
Public Shared Sub GetInheritInChildApps() 
    Dim sInfo As SectionInformation = _
    GetSectionInformation()
    
    Dim inheritInChildApps As Boolean = _
    sInfo.InheritInChildApplications
    Console.WriteLine("Inherit in child apps: {0}", _
    inheritInChildApps.ToString())
End Sub
	注解
属性 InheritInChildApplications 表示 inheritInChildApplications 配置文件中元素的 location 属性。
              false设置为 InheritInChildApplications 以防止特定于特定位置的设置 ((如网站的根目录)) 由存在于子目录中的应用程序继承。
以下示例演示如何在配置文件中使用此属性,以指定子应用程序不应继承网站根的位置元素中定义的设置:
<location path="." inheritInChildApplications="false">
属性 InheritInChildApplications 仅适用于特定于位置的配置设置。