OpenXmlElement.InsertBefore<T>(T, OpenXmlElement) 方法

定义

将指定的元素紧接在指定的引用元素之前。

public virtual T InsertBefore<T> (T newChild, DocumentFormat.OpenXml.OpenXmlElement refChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
public virtual T InsertBefore<T> (T? newChild, DocumentFormat.OpenXml.OpenXmlElement? referenceChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
public virtual T? InsertBefore<T> (T? newChild, DocumentFormat.OpenXml.OpenXmlElement? referenceChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
abstract member InsertBefore : 'T * DocumentFormat.OpenXml.OpenXmlElement -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
override this.InsertBefore : 'T * DocumentFormat.OpenXml.OpenXmlElement -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
abstract member InsertBefore : 'T * DocumentFormat.OpenXml.OpenXmlElement -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
override this.InsertBefore : 'T * DocumentFormat.OpenXml.OpenXmlElement -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
Public Overridable Function InsertBefore(Of T As OpenXmlElement) (newChild As T, refChild As OpenXmlElement) As T
Public Overridable Function InsertBefore(Of T As OpenXmlElement) (newChild As T, referenceChild As OpenXmlElement) As T

类型参数

T

参数

newChild
T

OpenXmlElement 插入的元素。

refChildreferenceChild
OpenXmlElement

返回

T

OpenXmlElement插入的元素。

适用于