Strokes.IndexOf Method

Strokes.IndexOf Method

Returns the index of a specific Stroke object within a Strokes collection.

Definition

Visual Basic .NET Public Function IndexOf( _
ByVal s As Stroke _
) As Integer
C# public int IndexOf(
Stroke s
);
Managed C++ public: int* IndexOf(
Stroke *s
);

Parameters

s Microsoft.Ink.Stroke. The Stroke object to check for.

Return Value

System.Int32. Returns the index of the Stroke within the Strokes collection.

Remarks

The Stroke object represented by the s parameter must be associated with the same Ink object as the Strokes collection.

If the Id property of the Stroke, represented by the s parameter, does not match one of the IDs in the Strokes collection, this method returns -1.

Examples

[C#]

This C# example finds the index of a particular Stroke object, theStroke, in a Strokes collection, theStrokes.

int theIndex = theStrokes.IndexOf(theStroke);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example finds the index of a particular Stroke object, theStroke, in a Strokes collection, theStrokes.

Dim theIndex As Integer = theStrokes.IndexOf(theStroke)
                

See Also