Configuration.NamespaceDeclared Configuration.NamespaceDeclared Configuration.NamespaceDeclared Configuration.NamespaceDeclared Property

定义

获取或设置一个值,该值指示配置文件是否具有 XML 命名空间。Gets or sets a value indicating whether the configuration file has an XML namespace.

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

属性值

如果配置文件有 XML 命名空间,则为 true;否则为 falsetrue if the configuration file has an XML namespace; otherwise, false.

注解

配置文件的格式为 XML 文件,但不需要 XML 命名空间。Configuration files are formatted as XML files, but an XML namespace is not required. 如果在打开Configuration对象true后此值为,则该文件将包含命名空间引用。If this value is true after the Configuration object is opened, then the file contains a namespace reference. 如果在保存Configuration对象之前true将其设置为,则会将命名空间引用添加到文件中。If it is set to true before the Configuration object is saved, then a namespace reference will be added to the file.

适用于