ערוך

שתף באמצעות


PackUriHelper.ComparePartUri(Uri, Uri) Method

Definition

Returns a value that indicates whether two package part URIs are equivalent.

public:
 static int ComparePartUri(Uri ^ firstPartUri, Uri ^ secondPartUri);
public static int ComparePartUri (Uri? firstPartUri, Uri? secondPartUri);
public static int ComparePartUri (Uri firstPartUri, Uri secondPartUri);
static member ComparePartUri : Uri * Uri -> int
Public Shared Function ComparePartUri (firstPartUri As Uri, secondPartUri As Uri) As Integer

Parameters

firstPartUri
Uri

The URI of the first PackagePart.

secondPartUri
Uri

The URI of the second PackagePart.

Returns

A value that indicates the relationship between firstPartUri and secondPartUri.

Value Meaning
Less than 0 firstPartUri is less than secondPartUri.
0 firstPartUri is equivalent to secondPartUri.
Greater than 0 firstPartUri is greater than secondPartUri.

Exceptions

firstPartUri or secondPartUri is not a valid part URI syntax.

Remarks

If both firstPartUri and secondPartUri are null, ComparePartUri returns 0. When comparing PackagePart URIs, a null URI is always less than a non-null URI. For cases where firstPartUri and secondPartUri are both relative PackagePart URIs, ComparePartUri performs the comparison.

Applies to

See also