when creating a thread, you must specify the thread entry, namely, the "function" or "process" to be executed by the thread through threadstart ".
Using system; using system. collections. generic; using system. text; using system. threading; namespace demo {public class threadclass {public void threadfunction () {console. writeline ("thread function is running... ") ;}} class program {static void main (string [] ARGs) {threadclass athreadclass = new threadclass (); thread athread = new thread (New threadstart (athreadclass. threadfunction); athread. start (); // When it is main thread, just sleep for some time. While (! Athread. isalive) {thread. sleep (3000);} console. readline (); athread. abort (); athread. join (); console. writeline ("thread function has been aborted! "); Try {// try to restart the aborted thread athread. start ();} catch (threadstateexception ex) {console. writeline ("error:" + ex. tostring ();} console. readline ();}}}