XmlReaderSettings.CloseInput 属性
定义
获取或设置一个值,该值指示当读取器关闭时,是否应关闭基础流或 TextReader。Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.
public:
property bool CloseInput { bool get(); void set(bool value); };
public bool CloseInput { get; set; }
member this.CloseInput : bool with get, set
Public Property CloseInput As Boolean
属性值
如果当读取器关闭时基础流或 TextReader 也应关闭,则为 true;否则为 false。true to close the underlying stream or TextReader when the reader is closed; otherwise false. 默认值为 false。The default is false.
注解
当流或传递给方法时,使用此设置 TextReader Create 。This setting is used when a stream or TextReader is passed to the Create method. 如果由读取器创建流用于其自身处理,例如,使用 URI 创建读取器时,或打开外部文档类型定义时,将始终关闭读取器。If a stream is created by the reader for its own processing, such as when the reader is created with a URI or when it opens an external document type definition, it is always closed when the reader is closed.