XmlWriter.XmlSpace XmlWriter.XmlSpace XmlWriter.XmlSpace XmlWriter.XmlSpace Property

定義

在衍生類別中覆寫時,取得表示目前 xml:space 範圍的 XmlSpaceWhen overridden in a derived class, gets an XmlSpace representing the current xml:space scope.

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

屬性值

XmlSpace,表示目前的 xml:space 範圍。An XmlSpace representing the current xml:space scope.

Value 意義Meaning
None 如果 xml:space 範圍不存在,這是預設值。This is the default if no xml:space scope exists.
Default 目前的範圍為 xml:space="default"。The current scope is xml:space="default".
Preserve 目前的範圍為 xml:space="preserve"。The current scope is xml:space="preserve".

例外狀況

在先前的非同步作業完成前呼叫了 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."

備註

這可讓某元件找出另一個元件中的寫入器哪種狀態。This allows one component to find out what state another component has left the writer in.

適用於