Share via


ContextLinkCollection.IndexOf Method

Returns the index of a specific ContextLink object within a ContextLinkCollection.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    link As ContextLink _
) As Integer
'Usage
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 function IndexOf(
    link : ContextLink
) : int

Parameters

Return Value

Type: System.Int32
The index identifying the specific ContextLink object within a ContextLinkCollection.

Remarks

If a ContextLink object that does not exist in the ContextLinkCollection collection is passed in, IndexOf returns -1.

Examples

This example shows how to find the index of a specific ContextLink named myLink, that might be contained in a ContextLinkCollection named links.

Dim index As Integer = links.IndexOf(myLink)
int index = links.IndexOf(myLink);

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

ContextLinkCollection Class

ContextLinkCollection Members

System.Windows.Ink Namespace