XmlWriterSettings.Async 屬性

定義

取得或設定值,指出非同步 XmlWriter 方法是否可以用於特定 XmlWriter 執行個體。

public:
 property bool Async { bool get(); void set(bool value); };
public bool Async { get; set; }
member this.Async : bool with get, set
Public Property Async As Boolean

屬性值

Boolean

如果可以使用非同步方法,則為 true,否則為false

備註

如果您想要在該實例上使用非同步 XmlWriter 方法,則必須在建立新的 XmlWriter 實例時,將此值 true 設定為 。 建立 XmlWriter 實例之後, Async 屬性是唯讀的。 此屬性的預設值為 false

多載會 XmlWriter.Create 忽略此旗標。 這表示如果您根據現有的 建立新的 XmlWriter ,非同步行為取決於輸入 XmlWriter ,而且您無法使用 Async 旗標來變更非同步 XmlWriter 行為。

適用於

另請參閱