共用方式為


ContextLinkCollection.Contains 方法

表示 ContextLinkCollection 是否包含特定 ContextLink 物件。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)

語法

'宣告
Public Function Contains ( _
    link As ContextLink _
) As Boolean
'用途
Dim instance As ContextLinkCollection
Dim link As ContextLink
Dim returnValue As Boolean

returnValue = instance.Contains(link)
public bool Contains(
    ContextLink link
)
public:
bool Contains(
    ContextLink^ link
)
public boolean Contains(
    ContextLink link
)
public function Contains(
    link : ContextLink
) : boolean

參數

傳回值

型別:System.Boolean
ContextLinkCollection 是否包含特定 ContextLink 物件。

範例

下列範例示範如何判斷 ContextLinkCollection (變數名稱為 links) 內是否包含特定 ContextLink (變數名稱為 myLink)。

If links.Contains(myLink) Then
    MessageBox.Show("The link is in the collection.")
End If
if (links.Contains(myLink))
{
    MessageBox.Show("The link is in the collection.");
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

ContextLinkCollection 類別

ContextLinkCollection 成員

Microsoft.Ink 命名空間