OpenXmlPackage.CreateMediaDataPart-Methode (String, String)
Creates a new MediaDataPart to the document package.
Namespace: DocumentFormat.OpenXml.Packaging
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Function CreateMediaDataPart ( _
contentType As String, _
extension As String _
) As MediaDataPart
'Usage
Dim instance As OpenXmlPackage
Dim contentType As String
Dim extension As String
Dim returnValue As MediaDataPart
returnValue = instance.CreateMediaDataPart(contentType, _
extension)
public MediaDataPart CreateMediaDataPart(
string contentType,
string extension
)
Parameter
- contentType
Typ: System.String
The content type of the the new MediaDataPart.
- extension
Typ: System.String
The part name extension (.dat, etc.) of the new MediaDataPart.
Rückgabewert
Typ: DocumentFormat.OpenXml.Packaging.MediaDataPart
The added MediaDataPart.
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentNullException | Thrown when contentType is null reference. |
ArgumentNullException | Thrown when extension is null reference. |