XmlWriter.Settings XmlWriter.Settings XmlWriter.Settings XmlWriter.Settings Property


取得 XmlWriterSettings 物件,用於建立這個 XmlWriter 執行個體。Gets the XmlWriterSettings object used to create this XmlWriter instance.

 virtual property System::Xml::XmlWriterSettings ^ Settings { System::Xml::XmlWriterSettings ^ get(); };
public virtual System.Xml.XmlWriterSettings Settings { get; }
member this.Settings : System.Xml.XmlWriterSettings
Public Overridable ReadOnly Property Settings As XmlWriterSettings


用於建立這個寫入器執行個體的 XmlWriterSettings 物件。The XmlWriterSettings object used to create this writer instance. 如果未使用 Create 方法建立這個寫入器,則這個屬性會傳回 nullIf this writer was not created using the Create method, this property returns null.


在先前的非同步作業完成前呼叫了 XmlWriter 方法。An XmlWriter method was called before a previous asynchronous operation finished. 在此情況下,會擲回 InvalidOperationException 與「非同步作業已經在進行中」的訊息。In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."


XmlWriterSettings類別用來指定要建立的寫入器執行個體上支援的功能集。The XmlWriterSettings class is used to specify the set of features to support on the created writer instance. XmlWriterSettings所傳回的物件Settings無法修改屬性。The XmlWriterSettings object returned by the Settings property cannot be modified. 任何嘗試變更個別的設定會造成擲回例外狀況。Any attempt to change individual settings results in an exception being thrown.