傳回 ContextNodeCollection 中特定 ContextNode 物件的索引。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Function IndexOf ( _
node As ContextNode _
) As Integer
'用途
Dim instance As ContextNodeCollection
Dim node As ContextNode
Dim returnValue As Integer
returnValue = instance.IndexOf(node)
public int IndexOf(
ContextNode node
)
public:
int IndexOf(
ContextNode^ node
)
public int IndexOf(
ContextNode node
)
public function IndexOf(
node : ContextNode
) : int
參數
- node
型別:Microsoft.Ink.ContextNode
要檢查的 ContextNode 物件。
傳回值
型別:System.Int32
ContextNodeCollection 內特定 ContextNode 物件的索引。
備註
如果傳入 ContextNodeCollection 集合內不存在的 ContextNode 物件,則這個方法會傳回 -1。
範例
下列範例示範如何尋找 ContextNodeCollection (nodes) 內可能包含的特定 ContextNode (變數名稱為 myNode) 的索引。
Dim index As Integer = nodes.IndexOf(myNode)
int index = nodes.IndexOf(myNode);
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0