语言

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 已属于集合时引发。

当 nextSibling 或 newItem 为 null 时引发。

当 nextSibling 不属于此集合时引发。

适用于