Namespace: DotNetNuke.Entities.Modules.ActionsAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
public int IndexOf(
ModuleAction value
) |
Visual Basic |
---|
Public Function IndexOf (
value As ModuleAction
) As Integer |
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 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