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

Inserts the specified element immediately before the specified reference element.

Namespace:  DocumentFormat.OpenXml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Overrides Function InsertBefore(Of T As OpenXmlElement) ( _
    newChild As T, _
    refChild As OpenXmlElement _
) As T
Dim instance As OpenXmlCompositeElement
Dim newChild As T
Dim refChild As OpenXmlElement
Dim returnValue As T

returnValue = instance.InsertBefore(newChild, _
public override T InsertBefore<T>(
    T newChild,
    OpenXmlElement refChild
where T : OpenXmlElement

Type Parameters

  • T


  • newChild
    Type: T
    The OpenXmlElement to insert.

Return Value

Type: T
The OpenXmlElement being inserted.


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

See Also


OpenXmlCompositeElement Class

OpenXmlCompositeElement Members

InsertBefore Overload

DocumentFormat.OpenXml Namespace