I've been looking for the past few days on how to do this but I just can't figure out what the correct way to assign a variable that will stay with the class
Any help will be appreciated.
private void button1_Click(object sender, EventArgs e)
{
tempclass tempclass = new tempclass();
Thread t = new Thread(tempclass.add);
string[] stuff = {"one 1", "two", "three"};
t.Start(stuff);
tempclass.show();
}
}
class tempclass
{
public string data;
public void add(object param)
{
string[] pams = (string[])param;
MessageBox.Show(pams[0]);
data = pams[0];
}
public void show()
{
MessageBox.Show(data);
}
}