Hi I want to use my code below for a thread. I have some example code for invoke but I dont know how to do it when it comes to my combo box selected item going to string.
This is what I have:
//My code
string cb1 = comboBox1.Items[comboBox1.SelectedIndex].ToString();
//Example 1
textBox2.Invoke((Action)(() => textBox2.Text = ""));
//Example 2
textbox2.Invoke((MethodInvoker)(delegate()
{
//do something
}));
Try this one if you want to go with
Example 1(using aFunc<string>delegate instead of anActiondelegate):