.NET Framework Class Library
PackUriHelper..::.ComparePackUri Method

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

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

Visual Basic (Declaration)
Public Shared Function ComparePackUri ( _
    firstPackUri As Uri, _
    secondPackUri As Uri _
) As Integer
Visual Basic (Usage)
Dim firstPackUri As Uri
Dim secondPackUri As Uri
Dim returnValue As Integer

returnValue = PackUriHelper.ComparePackUri(firstPackUri, _
    secondPackUri)
C#
public static int ComparePackUri(
    Uri firstPackUri,
    Uri secondPackUri
)
Visual C++
public:
static int ComparePackUri(
    Uri^ firstPackUri, 
    Uri^ secondPackUri
)
JScript
public static function ComparePackUri(
    firstPackUri : Uri, 
    secondPackUri : Uri
) : int
XAML
You cannot use methods in XAML.

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.

Exceptions

ExceptionCondition
ArgumentException

Either firstPackUri or secondPackUri is not an absolute URI.

-or-

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

Remarks

If both firstPackUri and secondPackUri are nullNothingnullptra null reference (Nothing in Visual Basic), 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.

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Other Resources

Tags :


Page view tracker