ContextNodeBaseCollection.IndexOf 方法 (ContextNodeBase)

返回特定 ContextNodeBase 对象在 ContextNodeBaseCollection 中的索引。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public Function IndexOf ( _
    node As ContextNodeBase _
) As Integer
用法
Dim instance As ContextNodeBaseCollection
Dim node As ContextNodeBase
Dim returnValue As Integer

returnValue = instance.IndexOf(node)
public int IndexOf(
    ContextNodeBase node
)
public:
int IndexOf(
    ContextNodeBase^ node
)
public int IndexOf(
    ContextNodeBase node
)
public function IndexOf(
    node : ContextNodeBase
) : int

参数

返回值

类型:System.Int32
特定 ContextNodeBase 对象在 ContextNodeBaseCollection 中的索引。

备注

如果 ContextNodeBaseCollection 中不存在传入的 ContextNodeBase 对象,则此方法返回 –1。

示例

下面的示例演示如何查找名为 nodes 的 ContextNodeBaseCollection 中可能包含的特定 ContextNodeBase (myNode) 的索引。

Dim index As Integer = nodes.IndexOf(myNode)
            int index = nodes.IndexOf(myNode);

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

ContextNodeBaseCollection 类

ContextNodeBaseCollection 成员

IndexOf 重载

System.Windows.Ink.AnalysisCore 命名空间