private void Form1_Load(object sender, EventArgs e) { //Instantiate the animal mainAnimal = new Animal(); //Instantiate a thread start instance, providing it the signature of the method that will run in the seperate thread. threadDelegate = new ThreadStart(mainAnimal.speak); //Instantiate a thread, feeding it the above delegate. animalNoiseThread = new Thread(threadDelegate); }
private void Form1_Load(object sender, EventArgs e) { mainAnimal = new Animal(); ThreadStart startDelegate = new ThreadStart(mainAnimal.speak); thread = new Thread(startDelegate); }
private void Form1_Load(object sender, EventArgs e) { mainAnimal = new Animal(); }
private void Form1_Load(object sender, EventArgs e) { mainAnimal = new Animal(); speaker = new Thread(mainAnimal.speak); }