Compartilhar via


OpenXmlPartContainer.DeletePart Method (String)

Deletes the specified child part from this part.

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

Syntax

'Declaration
Public Function DeletePart ( _
    id As String _
) As Boolean
'Usage
Dim instance As OpenXmlPartContainer
Dim id As String
Dim returnValue As Boolean

returnValue = instance.DeletePart(id)
public bool DeletePart(
    string id
)

Parameters

  • id
    Type: System.String
    The relationship ID of the part to be deleted.

Return Value

Type: System.Boolean
true if the part is successfully removed; otherwise, false. This method also returns false if the part was not found.

Exceptions

Exception Condition
ArgumentNullException

Thrown when "id" is null reference.

See Also

Reference

OpenXmlPartContainer Class

OpenXmlPartContainer Members

DeletePart Overload

DocumentFormat.OpenXml.Packaging Namespace