Export (0) Print
Expand All

OpenXmlElement.InsertAt<T> method

Inserts the specified element at the specified index in the current element's list of child elements.

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

public virtual T InsertAt<T>(
	T newChild,
	int index
)
where T : OpenXmlElement

Type parameters

T

Parameters

newChild
Type: T

The OpenXmlElement to be inserted.

index
Type: System.Int32

The zero-based index at which element should be inserted.

Return value

Type: T
The OpenXmlElement element that was inserted.

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

Community Additions

Show:
© 2014 Microsoft