In your comment, there is this line:
This means that you called the namespace of your program
. But at the
Thread th = new Thread(ts);
line, the compiler thinks that you target the namespace
, not the class
. You can change the name of your namespace to solve it.