PackagePart Constructor (Package, Uri)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
)

Parameters

package
Type: System.IO.Packaging.Package

The parent Package of the part.

partUri
Type: System.Uri

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

Exception Condition
ArgumentNullException

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
Show: