OpenXmlCompositeElement.InsertBefore(T, OpenXmlElement) OpenXmlCompositeElement.InsertBefore(T, OpenXmlElement) OpenXmlCompositeElement.InsertBefore(T, OpenXmlElement) Method

Definition

Inserts the specified element immediately before the specified reference element.

public override T InsertBefore<T> (T newChild, DocumentFormat.OpenXml.OpenXmlElement refChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
override this.InsertBefore : 'T * DocumentFormat.OpenXml.OpenXmlElement -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
Public Overrides Function InsertBefore(Of T As OpenXmlElement) (newChild As T, refChild As OpenXmlElement) As T

Type Parameters

T

Parameters

newChild
T T T

The OpenXmlElement to insert.

refChild
OpenXmlElement OpenXmlElement OpenXmlElement

The OpenXmlElement that is the reference node. The newChild is placed before this OpenXmlElement.

Returns

T T T

The OpenXmlElement that was inserted.

Remarks

No change if the (newChild == null). Just return null.

Applies to