Export (0) Print
Expand All

OpenXmlPartContainer.AddNewPart<T> method

Adds a new part of type T.

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

public T AddNewPart<T>()
where T : OpenXmlPart, IFixedContentTypePart

Type parameters

T

The class of the part.

Return value

Type: T
The added part.

ExceptionCondition
OpenXmlPackageException

When the part is not allowed to be referenced by this part.

Community Additions

ADD
Show:
© 2014 Microsoft