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