Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlWriterSettings::CloseOutput Property

 

Gets or sets a value indicating whether the XmlWriter should also close the underlying stream or TextWriter when the Close method is called.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public:
property bool CloseOutput {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true to also close the underlying stream or TextWriter; otherwise, false. The default is false.

This setting is useful when you wish to write XML to a stream, and then add extra information to the end of the stream after the XmlWriter has finished writing.

This property only applies to XmlWriter instances that output XML content to a stream or TextWriter; otherwise, this setting is ignored.

The following example writes an XML fragment to a memory stream.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft