Posted By

phpmann on 02/10/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Search and Replace listbox with text


 / Published in: C#
 

  1. for (int i = 0; i < listBox1.Items.Count; i++)
  2. {
  3. String Text = Convert.ToString(listBox1.Items[i]);
  4. Text = Text.Replace(textBox2.Text, textBox3.Text);
  5. listBox1.Items[i] = Text;
  6.  
  7. // listBox1.Items[i] = Regex.Replace(Convert.ToString(listBox1.Items[i]), textBox2.Text, textBox3.Text);

Report this snippet  

You need to login to post a comment.