PackagePart.GetRelationshipsByType Method
.NET Framework 4.5
Returns a collection of the relationships that match a specified RelationshipType.
Namespace: System.IO.Packaging
Assembly: WindowsBase (in WindowsBase.dll)
Parameters
- relationshipType
- Type: System.String
The RelationshipType of the relationships to locate and return in the collection.
Return Value
Type: System.IO.Packaging.PackageRelationshipCollectionA collection of the relationships that match the specified relationshipType.
| Exception | Condition |
|---|---|
| ArgumentNullException | relationshipType is null. |
| ArgumentException | relationshipType is an empty string. |
| InvalidOperationException | The part has been deleted. -or- |
| IOException | The package is write-only (relationship information cannot be read). |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.