Package::RelationshipExists Method (String^)

 
System_CAPS_noteNote

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

Indicates whether a package-level relationship with a given ID is contained in the package.

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

public:
bool RelationshipExists(
	String^ id
)

Parameters

id
Type: System::String^

The Id of the relationship to check for.

Return Value

Type: System::Boolean

true if a package-level relationship with the specified id is in the package; otherwise, false.

Exception Condition
ArgumentNullException

id is null.

XmlException

id is not a valid XML identifier.

ObjectDisposedException

The package is not open (Dispose or Close has been called).

IOException

The package is write-only.

For additional information, see the Open Packaging Conventions (OPC) specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.

.NET Framework
Available since 3.0
Return to top
Show: