private void _worker_DoWork(object sender, DoWorkEventArgs e) { WorkerArgument arg = e.Argument as WorkerArgument; ICollection<string> words = new WordGenerator().GenerateWords(arg.Size, arg.Choices); string[] wordsArray = new string[words.Count]; words.CopyTo(wordsArray, 0); e.Result = wordsArray; }
private void _worker_DoWork(object sender, DoWorkEventArgs e) { WorkerArgument arg = e.Argument as WorkerArgument; ICollection <string> words = new WordGenerator().GenerateWords(arg.Size, arg.Choices); string[] wordsArray = new string[words.Count]; words.CopyTo(wordsArray, 0); e.Result = wordsArray; }