get index of item in listbox c#
<p>I am trying to get index of each items in a listbox 
Here is my code</p>

<pre><code>           foreach (ListItem lstItem in lstCostCenter.Items)
           {
               int x = lstCostCenter.Items.IndexOf(lstItem);

           }
</code></pre>

<p>But each time its returning 0 only.</p>

<p>Please some one help me.</p>

<p>Thanks
Gulrej</p>
