Click or drag to resize

OpenXmlElementInsertBeforeSelfT Method

Inserts the specified element immediately before the current element.

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.20.0+Branch.release-v2.20.0.Sha.a873d3fbff9bffe179fea62486da950adf5be65d.a873d3fbff9bffe179fea62486da950adf5be65d
Syntax
public T InsertBeforeSelf<T>(
	T newElement
)
where T : OpenXmlElement

Parameters

newElement  T
The new element to insert.

Type Parameters

T

Return Value

T
The inserted element.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when the newElement parameter is a null reference.
InvalidOperationExceptionThrown when the parent is a null reference.
See Also