
上QQ阅读APP看书,第一时间看更新
Starting a thread
Now, with threads like this, you get a thread started on the next line as follows:
td.Start();
This will start the thread in its own little separate piece of processing, separate from the main program so to speak.
So, the big idea here is that this anonymous stuff is quite powerful. For example, you can build an anonymous function or method such as the preceding one we created. It runs, but it's not named, and basically, even when you make a new Thread object, you can make a delegate. In other words, it can do a bit of processing of its own and you don't have to put this off into other functions or anything like that.