Share via


ContextNodeCollection.IndexOf Method (ContextNode)

Returns the index of a specific ContextNode object within a ContextNodeCollection.

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

Syntax

'Declaration
Public Function IndexOf ( _
    node As ContextNode _
) As Integer
'Usage
Dim instance As ContextNodeCollection 
Dim node As ContextNode 
Dim returnValue As Integer 

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

Parameters

Return Value

Type: System.Int32
The index location of a specific ContextNode object within a ContextNodeCollection.

Remarks

If a ContextNode object is passed in without it already existing in the ContextNodeCollection collection, then IndexOf returns -1.

Examples

The following example shows how to find the index of a specific ContextNode named myNode, that might be contained in a ContextNodeCollection (named nodes).

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

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

ContextNodeCollection Class

ContextNodeCollection Members

IndexOf Overload

System.Windows.Ink Namespace