Export (0) Print
Expand All

OpenXmlElement.InsertAfterSelf<T> method

Inserts the specified element immediately after the current element.

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

public T InsertAfterSelf<T>(
	T newElement
)
where T : OpenXmlElement

Type parameters

T

Parameters

newElement
Type: T

The new element to be inserted as a sibling.

Return value

Type: T
The inserted element.

ExceptionCondition
ArgumentNullException

Thrown when the "newElement" parameter is a null reference.

InvalidOperationException

Thrown when the parent is a null reference.

Community Additions

Show:
© 2014 Microsoft