private void stepThread_DoWork(object sender, DoWorkEventArgs e) { ArrayList list = (ArrayList)e.Argument; StreamWriter file = (StreamWriter)list[0]; Observer obs = (Observer)list[1]; comp.Step(file, obs); }