TextElementCollection<TextElementType>.InsertBefore 方法

定義

在集合的指定集合項目前面插入指定的項目。

public:
 void InsertBefore(TextElementType nextSibling, TextElementType newItem);
public void InsertBefore (TextElementType nextSibling, TextElementType newItem);
member this.InsertBefore : 'extElementType * 'extElementType -> unit
Public Sub InsertBefore (nextSibling As TextElementType, newItem As TextElementType)

參數

nextSibling
TextElementType

集合中將在其前插入新項目的項目。

newItem
TextElementType

要插入集合的項目。

例外狀況

newItem 已經屬於集合時引發。

nextSiblingnewItemnull 時引發。

nextSibling 不屬於此集合時引發。

適用於