The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PackUriHelper.GetPartUri Method (Uri)


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

Returns the URI of a PackagePart within a specified pack URI.

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

public static Uri GetPartUri(
	Uri packUri


Type: System.Uri

The pack URI from which to return the PackagePart URI.

Return Value

Type: System.Uri

The URI of the PackagePart in the given packUri, or null if packUri points to a package instead of a PackagePart.

The returned PackagePart URI is relative to the package root and is an absolute path that always starts with "/" and conforms to the syntax defined in the Open Packaging Conventions Specification.

The following table illustrates sample cases for GetPartUri.


 Returned Part URI 











.NET Framework
Available since 3.0
Return to top