使用節點的識別項,傳回 ContextNodeBaseCollection 中特定 ContextNodeBase 物件的索引。
命名空間: System.Windows.Ink.AnalysisCore
組件: IACore (在 IACore.dll 中)
語法
'宣告
Public Function IndexOf ( _
nodeId As Guid _
) As Integer
'用途
Dim instance As ContextNodeBaseCollection
Dim nodeId As Guid
Dim returnValue As Integer
returnValue = instance.IndexOf(nodeId)
public int IndexOf(
Guid nodeId
)
public:
int IndexOf(
Guid nodeId
)
public int IndexOf(
Guid nodeId
)
public function IndexOf(
nodeId : Guid
) : int
參數
- nodeId
型別:System.Guid
所搜尋 ContextNodeBase 物件的識別項。
傳回值
型別:System.Int32
ContextNodeBaseCollection 內特定 ContextNodeBase 物件的索引。
備註
如果傳入 Guid,而且 ContextNodeBaseCollection 中沒有具有該識別項的 ContextNodeBase 物件,則這個方法會傳回 -1。
範例
下列範例說明如何尋找特定 ContextNodeBase (myNode) 的索引,其可能包含在 ContextNodeBaseCollection (名為 nodes) 內。
Dim myNodePosition As Integer = nodes.IndexOf(myNode.Id)
int myNodePosition = nodes.IndexOf(myNode.Id);
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0