XmlWriterSettings.CloseOutput プロパティ
アセンブリ: System.Xml (system.xml.dll 内)

Dim instance As XmlWriterSettings Dim value As Boolean value = instance.CloseOutput instance.CloseOutput = value
/** @property */ public boolean get_CloseOutput () /** @property */ public void set_CloseOutput (boolean value)
基になるストリームまたは TextWriter も閉じる場合は true。それ以外の場合は false。既定値は false です。

この設定は、ストリームに XML を書き込み、XmlWriter が書き込みを完了した後でストリームの最後に補足情報を追加する場合に役立ちます。
このプロパティは、ストリームまたは TextWriter に XML の内容を出力する、XmlWriter のインスタンスにのみ適用されます。それ以外の場合、この設定は無視されます。

XML フラグメントをメモリ ストリームに書き込む例を次に示します。
Dim settings As XmlWriterSettings = New XmlWriterSettings() settings.OmitXmlDeclaration = true settings.ConformanceLevel = ConformanceLevel.Fragment settings.CloseOutput = false ' Create the XmlWriter object and write some content. Dim strm as MemoryStream = new MemoryStream() Dim writer As XmlWriter = XmlWriter.Create(strm, settings) writer.WriteElementString("orderID", "1-456-ab") writer.WriteElementString("orderID", "2-36-00a") writer.Flush() writer.Close() ' Do additonal processing on the stream.
XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.ConformanceLevel = ConformanceLevel.Fragment; settings.CloseOutput = false; // Create the XmlWriter object and write some content. MemoryStream strm = new MemoryStream(); XmlWriter writer = XmlWriter.Create(strm, settings); writer.WriteElementString("orderID", "1-456-ab"); writer.WriteElementString("orderID", "2-36-00a"); writer.Flush(); writer.Close(); // Do additonal processing on the stream.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からXmlWriterSettings.CloseOutput プロパティを検索する場合は、下記のリンクをクリックしてください。

- XmlWriterSettings.CloseOutput プロパティのページへのリンク