PackagePart.GetRelationships 方法

定义

返回此部分拥有的所有关系的集合。Returns a collection of all the relationships that are owned by this part.

public:
 System::IO::Packaging::PackageRelationshipCollection ^ GetRelationships();
public System.IO.Packaging.PackageRelationshipCollection GetRelationships ();
member this.GetRelationships : unit -> System.IO.Packaging.PackageRelationshipCollection
Public Function GetRelationships () As PackageRelationshipCollection

返回

PackageRelationshipCollection

此部分拥有的所有关系的集合。A collection of all the relationships that are owned by the part.

例外

已删除此部分。The part has been deleted.

- 或 --or- Package 没有打开(调用了 Dispose(Boolean)Close())。The Package is not open (Dispose(Boolean) or Close() has been called).

包是只写的(无法读取关系信息)。The package is write-only (relationship information cannot be read).

注解

返回的集合从不 null 为; 但是,如果该部件未定义任何关系,则该集合可能包含零个元素。The returned collection is never null; however, the collection might contain zero elements if the part does not define any relationships.

适用于

另请参阅