<p>I'm using the following syntax to loop through a list collection:</p>

<pre><code>For Each PropertyActor As JCPropertyActor In MyProperty.PropertyActors

    i = IndexOf(PropertyActor)
Next
</code></pre>

<p>How do I get the index of the current object within the loop? I'm using IndexOf(PropertyActor) but this seems inefficient as it searches the collection when I already have the object available!</p>

just initialize an integer variable before entering the loop and iterate it...
```
```
Dim i as Integer 
For Each PropertyActor As JCPropertyActor In MyProperty.PropertyActors
    i++
Next
```
```