Gets the index in the collection of the specified ModuleActionCollection, if it exists in the collection.

Namespace: DotNetNuke.Entities.Modules.Actions
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public int IndexOf(
	ModuleAction value
)
Visual Basic
Public Function IndexOf ( 
	value As ModuleAction
) As Integer

Parameters

value
Type: DotNetNuke.Entities.Modules.Actions..::..ModuleAction
The ModuleAction to locate in the collection.

Return Value

The index in the collection of the specified object, if found; otherwise, -1.

Examples

This example tests for the presense of a ModuleAction in the collection, and retrieves its index if it is found.
 Copy imageCopy Code
Dim testModuleAction = New ModuleAction(5, "Edit Action", "Edit")
Dim itemIndex As Integer = -1
If collection.Contains(testModuleAction) Then
  itemIndex = collection.IndexOf(testModuleAction)
End If

See Also