Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 override T InsertBefore<T>(
	T newChild,
	OpenXmlElement refChild
)
where T : OpenXmlElement

Type parameters

T

Parameters

newChild
Type: T

The OpenXmlElement to insert.

refChild
Type: DocumentFormat.OpenXml.OpenXmlElement

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

Return value

Type: T
The OpenXmlElement that was inserted.

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

Show:
© 2015 Microsoft