XmlWriterSettings.CloseOutput プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > XmlWriterSettings.CloseOutput プロパティの意味・解説 

XmlWriterSettings.CloseOutput プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

Close メソッド呼び出したときに、 XmlWriter が、基になるストリームまたは TextWriter閉じ必要があるかどうかを示す値を取得または設定します

名前空間: System.Xml
アセンブリ: System.Xml (system.xml.dll 内)
構文構文

Dim instance As XmlWriterSettings
Dim value As Boolean

value = instance.CloseOutput

instance.CloseOutput = value
public bool CloseOutput { get;
 set; }
public:
property bool CloseOutput {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_CloseOutput ()

/** @property */
public void set_CloseOutput (boolean value)

プロパティ
基になるストリームまたは TextWriter閉じ場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

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.
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からXmlWriterSettings.CloseOutput プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からXmlWriterSettings.CloseOutput プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からXmlWriterSettings.CloseOutput プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

XmlWriterSettings.CloseOutput プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



XmlWriterSettings.CloseOutput プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS