OpenXmlCompositeElement.ReplaceChild<T>(OpenXmlElement, T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The new OpenXmlElement to put in the child list.
- oldChild
- T
The OpenXmlElement being replaced in the list.
Returns
- T
The OpenXmlElement that was replaced.
Remarks
No change if the (newChild == null). Just return null.