update a listbox item
<p>i want from my program to select a listbox item and then update it.i have a list ecoItems.Eco is a class with 2 store variables,one string and one double variable.SetEcoValues is a set Method take two values,one string and one double.i try this code but don't change anything.any suggestions?</p>

<pre><code>         private void Update_Click(object sender, EventArgs e)
    {


            Eco y;
            y = ecoItems.ElementAt&lt;Eco&gt;(listBox1.SelectedIndex);
            y.SetEcoValues(textBox1.Text,Convert.ToDouble(textBox2.Text));
            listBox5.Items.Insert(listBox1.SelectedIndex, y);
        }


    }
</code></pre>
