Main
foreach(Thread t in createTestThreads(8)) {
t.Start();
}
private static Thread[] createTestThreads(int ThreadCount) {
Thread[] threads = new Thread[ThreadCount];
for(int i = 0; i < ThreadCount; i++) {
Thread t = new Thread(() => {
Console.Write(i);
});
threads[i] = t;
}
return threads;
}
Wished Result: 01234567 (Probably not in that exact order, but doesn't have to be) Actual Result: 88888888 Is there any other way of doing this without naming the Threads manually t0, t1, t2, etc.. Like is there a way to create Threads with dynamical names for example Thread ("t" + i) = new Thread (() =>