次の方法で共有


OpenXmlElement.InsertBeforeSelf<T> Method

Inserts the specified element immediately before this element.

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

Syntax

'宣言
Public Function InsertBeforeSelf(Of T As OpenXmlElement) ( _
    newElement As T _
) As T
'使用
Dim instance As OpenXmlElement
Dim newElement As T
Dim returnValue As T

returnValue = instance.InsertBeforeSelf(newElement)
public T InsertBeforeSelf<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.

See Also

Reference

OpenXmlElement Class

OpenXmlElement Members

DocumentFormat.OpenXml Namespace