This documentation is archived and is not being maintained.

XmlWriter.Close Method

When overridden in a derived class, closes this stream and the underlying stream.

[Visual Basic]
Public MustOverride Sub Close()
public abstract void Close();
public: virtual void Close() = 0;
public abstract function Close();


Exception Type Condition
InvalidOperationException A call is made to write more output after Close has been called or the result of this call is an invalid XML document.


Any elements or attributes left open are automatically closed.


See Close (in the XmlTextWriter class) for an example using this method.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlWriter Class | XmlWriter Members | System.Xml Namespace