OpenXmlCompositeElement.ReplaceChild(OpenXmlElement, T) OpenXmlCompositeElement.ReplaceChild(OpenXmlElement, T) OpenXmlCompositeElement.ReplaceChild(OpenXmlElement, T) Method

Definition

Replaces one of the current element's child elements with another OpenXmlElement element.

public override T ReplaceChild<T> (DocumentFormat.OpenXml.OpenXmlElement newChild, T oldChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
override this.ReplaceChild : DocumentFormat.OpenXml.OpenXmlElement * 'T -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
Public Overrides Function ReplaceChild(Of T As OpenXmlElement) (newChild As OpenXmlElement, oldChild As T) As T

Type Parameters

T

Parameters

newChild
OpenXmlElement OpenXmlElement OpenXmlElement

The new OpenXmlElement to put in the child list.

oldChild
T T T

The OpenXmlElement being replaced in the list.

Returns

T T T

The OpenXmlElement that was replaced.

Remarks

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

Applies to