Others gave a solution to this particular problem, but the real answer to the question "What am I doing wrong?" is (IMO) "You are not reading the error message." There are error messages for some reason: like tips to tell you what is wrong.
You have several error messages:
The type or namespace name 'Fpp' could not be found (can't you see using the directive or assembly link?)
The error message gives you a hint here: it cannot find the type, but maybe because you do not have the correct references or using directives. So check your links and check your using directives. In this case, Thread is in mscorlib , so you are unlikely to have a problem with the assembly reference, so the next check is your using directives. It is in the System.Threading namespace, so you need to
using System.Threading;
at the top - or, of course, you can just point System.Threading.Thread everywhere, but it's a little long.
Reading error messages usually means you donβt have to ask what you are doing wrong: they will tell you how they did it.
Correcting a ThreadWork error ThreadWork more difficult to determine - you must use any method that you want to execute in a new thread ... if you really want to start a new thread yourself. Are you really sure?
source share