OpenXmlPartContainer.DeletePart Method (String)
Deletes the specified child part from this part.
Namespace: DocumentFormat.OpenXml.Packaging
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'宣言
Public Function DeletePart ( _
id As String _
) As Boolean
'使用
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. |