共用方式為


ContextNodeBaseCollection.Contains 方法 (Guid)

布林值,根據識別項指出 ContextNodeBaseCollection 是否包含特定的 ContextNodeBase 物件。

命名空間:  System.Windows.Ink.AnalysisCore
組件:  IACore (在 IACore.dll 中)

語法

'宣告
Public Function Contains ( _
    nodeId As Guid _
) As Boolean
'用途
Dim instance As ContextNodeBaseCollection
Dim nodeId As Guid
Dim returnValue As Boolean

returnValue = instance.Contains(nodeId)
public bool Contains(
    Guid nodeId
)
public:
bool Contains(
    Guid nodeId
)
public boolean Contains(
    Guid nodeId
)
public function Contains(
    nodeId : Guid
) : boolean

參數

傳回值

型別:System.Boolean
布林值,表示 ContextNodeBaseCollection 是否包含特定 ContextNodeBase 物件。

範例

下列範例說明如何檢查 ContextNodeBaseCollection (名為 nodes) 中是否包含特定的 ContextNodeBase (myNode)。

If nodes.Contains(myNode.Id) Then
    MessageBox.Show("The node is in the collection.")
End If
            if (nodes.Contains(myNode.Id))
                MessageBox.Show("The node is in the collection.");

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

ContextNodeBaseCollection 類別

ContextNodeBaseCollection 成員

Contains 多載

System.Windows.Ink.AnalysisCore 命名空間