Information
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.ComparePackUri Method (Uri, Uri)

 

Returns a value that indicates whether two pack URIs are equivalent.

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

public static int ComparePackUri(
	Uri firstPackUri,
	Uri secondPackUri
)

Parameters

firstPackUri
Type: System.Uri

The first pack URI.

secondPackUri
Type: System.Uri

The second pack URI.

Return Value

Type: System.Int32

A signed integer indicating the relationship between firstPackUri and secondPackUri.

Value

Meaning

Less than 0

firstPackUri is less than secondPackUri.

0

firstPackUri is equivalent to secondPackUri.

Greater than 0

firstPackUri is greater than secondPackUri.

Exception Condition
ArgumentException

Either firstPackUri or secondPackUri is not an absolute URI.

-or-

Either firstPackUri or secondPackUri do not begin with a "pack://" scheme.

If both firstPackUri and secondPackUri are null, ComparePackUri returns 0. When comparing pack URIs, a null URI is always less than a non-null URI. For cases where firstPackUri and secondPackUri are both absolute pack URIs, ComparePackUri performs the comparison.

.NET Framework
Available since 3.0
Return to top
Show: