1-arg ThreadStart(Threads)

main() { Thread MainThread = new Thread(new ThreadStart(ThreadProcMain)); MainThread .Start(); … ThreadProcMain() { …. Thread InThread = new Thread(new ThreadStart(ThreadProcIn)); InThread.start(); while( InThread.isAlive() ){ TRUE running FALSE on abort/terminate ; // do nothing } …. } } ​ I’m barely aware of C#coming from a Java background. I’ve read the simpler explanation https://www.dotnetperls.com/threadstart and from […]

Is it possible to make some functions/programs/macros (however they should be called) in C# to add some functionality to MS Word, Power Paint etc?

Is it possible to make some functions/programs/macros (however they should be called) in C# to add some functionality to MS Word, Power Paint etc? In other words. Could I change sth in Office programs using C#? I’m yet before the start of learning (TBH) and I’m looking for the right language to do this kind […]

Task Question

Why do i have to create a local copy of the loop counter so that the correct task number is passed into the lambda expression? Task[] tasks = new Task[10]; for (int i = 0; i < tasks.Length; i++) { int taskNum = i; //this tasks[i] = Task.Run(() => DoWork(taskNum)); } ​ submitted by /u/merdone […]