Partager 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 int IndexOf (
    ContextNode node
)
public function IndexOf (
    node : ContextNode
) : int
Not applicable.

Parameters

Return Value

The index of the 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.

Example

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

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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

ContextNodeCollection Class
ContextNodeCollection Members
System.Windows.Ink Namespace