OpenXmlElement.InsertAfterSelf<T> Method
Inserts the specified element immediately after this element.
Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Function InsertAfterSelf(Of T As OpenXmlElement) ( _
newElement As T _
) As T
'Usage
Dim instance As OpenXmlElement
Dim newElement As T
Dim returnValue As T
returnValue = instance.InsertAfterSelf(newElement)
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the "newElement" parameter is a null reference. |
InvalidOperationException | Thrown when the parent is a null reference. |