XmlTextWriter.BaseStream 屬性

定義

取得基礎資料流物件。

public:
 property System::IO::Stream ^ BaseStream { System::IO::Stream ^ get(); };
public System.IO.Stream? BaseStream { get; }
public System.IO.Stream BaseStream { get; }
member this.BaseStream : System.IO.Stream
Public ReadOnly Property BaseStream As Stream

屬性值

XmlTextWriter 正在寫入的資料流,如果使用不是從 TextWriterStreamWriter 類別來建構 null,則為 XmlTextWriter

備註

注意

從 .NET Framework 2.0 開始,建議您使用 XmlWriter.Create 方法和 XmlWriterSettings 類別來建立 XmlWriter 實例,以利用新功能。

如果使用衍生自 類別的 StreamWriter 來建構 TextWriter 寫入器,則此屬性相當於 StreamWriter.BaseStream 屬性。 如果使用 建構寫入器,這個屬性會 Stream 傳回傳遞至建構 Stream 函式的 。 如果使用檔案名建構寫入器,這個屬性會 Stream 傳回代表檔案的 。

適用於