共用方式為


OpenXmlPartContainer.DeleteParts<T> Method

Deletes all the parts which in the passed in collection from the document.

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

Syntax

'Declaration
Public Sub DeleteParts(Of T As OpenXmlPart) ( _
    partsToBeDeleted As IEnumerable(Of T) _
)
'Usage
Dim instance As OpenXmlPartContainer
Dim partsToBeDeleted As IEnumerable(Of T)

instance.DeleteParts(partsToBeDeleted)
public void DeleteParts<T>(
    IEnumerable<T> partsToBeDeleted
)
where T : OpenXmlPart

Type Parameters

  • T

Parameters

Exceptions

Exception Condition
ArgumentNullException

Thrown when "partsToBeDeleted" is null reference.

See Also

Reference

OpenXmlPartContainer Class

OpenXmlPartContainer Members

DocumentFormat.OpenXml.Packaging Namespace