C# Thread Data Exchange by Object
In this tutorial, we will see how to exchange thread data by using an object in C#. This post is very similar to this post I already made about sending/receiving data to/from a thread. The only difference is that here an object will be used for the data. To pass data into the thread we will create a class and make two properties one for the input data and one for the callback delegate. When an instance of the class is being created the input data and the callback delegate must be passed into the constructor. After the object has been created its doWork() method can be started as a new thread.









