Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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
)

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.
ExceptionCondition
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

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.