語言

PackagePart.RelationshipExists(String) 方法

定義

回傳一個值,指示該部分是否與指定 Id擁有關係。

public:
 bool RelationshipExists(System::String ^ id);
public bool RelationshipExists(string id);
member this.RelationshipExists : string -> bool
Public Function RelationshipExists (id As String) As Boolean

參數

id
String

Id要檢查的是關係的狀況。

傳回

true 若此部分與指定 id有關係;否則, false。

例外狀況

id 是 null。

id 不是有效的 XML 識別碼。

該部分已被刪除。

-或-

Package目前尚未開放(Dispose(Boolean)或Close()已被通知)。

該套件為唯寫(無法讀取關係資訊)。

備註

id 必須是有效的 XML 識別碼。 該 id 型別為 xsd:ID,必須遵循 XML 架構第 2 部分:資料型 別規範(參見 https://www.w3.org/TR/xmlschema-2/#ID)中規定的命名規則。

適用於

另請參閱