返回特定 ContextLinkBase 对象在 ContextLinkBaseCollection 中的索引。
命名空间: System.Windows.Ink.AnalysisCore
程序集: IACore(在 IACore.dll 中)
语法
声明
Public Function IndexOf ( _
link As ContextLinkBase _
) As Integer
用法
Dim instance As ContextLinkBaseCollection
Dim link As ContextLinkBase
Dim returnValue As Integer
returnValue = instance.IndexOf(link)
public int IndexOf(
ContextLinkBase link
)
public:
int IndexOf(
ContextLinkBase^ link
)
public int IndexOf(
ContextLinkBase link
)
public function IndexOf(
link : ContextLinkBase
) : int
参数
- link
类型:System.Windows.Ink.AnalysisCore.ContextLinkBase
与索引关联的 ContextLinkBase 对象。
返回值
类型:System.Int32
特定 ContextLinkBase 对象在 ContextLinkBaseCollection 中的索引。
备注
如果传入 ContextLinkBaseCollection 集合中不存在的 ContextLinkBase 对象,则此方法返回 -1。
示例
下面的示例演示如何查找名为 links 的 ContextLinkBaseCollection 中可能包含的名为 myLink 的特定 ContextLinkBase 的索引。
Dim index As Integer = links.IndexOf(myLink)
int index = links.IndexOf(myLink);
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0