Click or drag to resize

OpenXmlCompositeElementInsertAtT Method

Inserts the specified element at the specified index of the current element's children.

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.11.3+Branch.master.Sha.3fcdea311b5a001803ff150de35c25fd4cd62f93.3fcdea311b5a001803ff150de35c25fd4cd62f93
Syntax
public override T InsertAt<T>(
	T newChild,
	int index
)
where T : OpenXmlElement

Parameters

newChild  T
The OpenXmlElement element to insert.
index  Int32
The zero-based index to insert the element to.

Type Parameters

T

Return Value

T
The OpenXmlElement element that was inserted.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThrown when index is less than 0 or is greater than the count of children.
Remarks
Returns null if newChild equals null.
See Also