multithreading - C# ParameterizedThreadStart not supported in Visual Studio 2003? -
I am doing a multi-threaded application in C # and some parameters have to pass in a thread.
Try to use the ParameterizedThreadStart class so that I can pass a class variable (all the parameters I want to pass). However, the square is not being recognized (in the source code there is a red line below it) and on compilations I have been parameterized to name a "type or namespace" did not get the restart (do not you remember the use director or assembly reference Are you?) ".
I am using the following libraries from the framework: Using the system; Using System.Collections; Using the system. threading;
Am I doing something wrong? I VS 2003 (7.1.6030) and using the .NET Framework 1.1
Thank you.
This parametric thread type is not present before NAT Framework 2.0, but you have a similar target Can pass) and create a simple class and use the good old threadstart representative to do the following:
Class Paramahlders {Private Object Data; Public ParamHolder (Object Data) / Better yet using parameter (s) type {this.data = data; } Public Zero DoWork () {// Usage Data // work}}
will be used and:
... object param = 10; // Set some value Thread thread = new thread (new threadstart (new Paramahould (Ultimate). Duvers)); Thread.Start (); ...
Comments
Post a Comment