PackagePart Constructor (Package, Uri)

PackagePart Constructor (Package, Uri)


Initializes a new instance of the PackagePart class with a specified parent Package and part URI.

Namespace:   System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

protected PackagePart(
	Package package,
	Uri partUri


Type: System.IO.Packaging.Package

The parent Package of the part.

Type: System.Uri

The URI of the part, relative to the parent Package root.

Exception Condition

package or partUri is null.

partUri must be valid PackagePart URI formed in accordance with the RFC 3986 Uniform Resource Identifier (URI) Generic Syntax specification and the Open Packaging Conventions specification.

Use this constructor when the ContentType of the part is not immediately known and will be set later when CreatePart is called.

By default, the CompressionOption property of the part is initialized to NotCompressed.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft