Share via


OpenXmlElementFunctionalExtensions.With Method

Definition

Overloads

With<TElement>(TElement, Object)

Adds child elements or attributes to the given element.

With<TElement>(TElement, Object[])

Adds child elements or attributes to the given element.

With<TElement>(TElement, Object)

Adds child elements or attributes to the given element.

public static TElement With<TElement> (this TElement element, object content) where TElement : DocumentFormat.OpenXml.OpenXmlElement;
static member With : 'Element * obj -> 'Element (requires 'Element :> DocumentFormat.OpenXml.OpenXmlElement)
<Extension()>
Public Function With(Of TElement As OpenXmlElement) (element As TElement, content As Object) As TElement

Type Parameters

TElement

The element type.

Parameters

element
TElement

The element.

content
Object

The content to be added to the element.

Returns

TElement

The element with the content added to it.

Applies to

With<TElement>(TElement, Object[])

Adds child elements or attributes to the given element.

public static TElement With<TElement> (this TElement element, params object[] content) where TElement : DocumentFormat.OpenXml.OpenXmlElement;
static member With : 'Element * obj[] -> 'Element (requires 'Element :> DocumentFormat.OpenXml.OpenXmlElement)
<Extension()>
Public Function With(Of TElement As OpenXmlElement) (element As TElement, ParamArray content As Object()) As TElement

Type Parameters

TElement

The element type.

Parameters

element
TElement

The element.

content
Object[]

The content to be added to the element.

Returns

TElement

The element with the content added to it.

Applies to