ContentLocator.StartsWith(ContentLocator) 方法

定義

傳回值,這個值表示 ContentLocatorPart 項目在指定之 ContentLocator 中的起始順序是否與在這個 ContentLocator 中的一樣。

public:
 bool StartsWith(System::Windows::Annotations::ContentLocator ^ locator);
public bool StartsWith (System.Windows.Annotations.ContentLocator locator);
member this.StartsWith : System.Windows.Annotations.ContentLocator -> bool
Public Function StartsWith (locator As ContentLocator) As Boolean

參數

locator
ContentLocator

要與這個 ContentLocator. 比較的 ContentLocatorPartContentLocator 項目清單。

傳回

Boolean

如果 ContentLocatorPart 項目在這個 ContentLocator 中的起始順序與在指定之 locator 中的相符則為 true,否則為 false

例外狀況

locatornull

備註

StartsWithtrue 回 中專案的起始序列 ContentLocatorPart ,此 ContentLocator 序列符合指定 locator 中的專案。

StartsWithfalse如果指定的 locator 包含 ContentLocatorPart 不同、順序不同或大於這個 ContentLocator 的專案,則傳回 。

適用於

另請參閱