Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello... i wanted to know why we cant use 2 constructors while creating threading...?????
Posted
Comments
[no name] 16-Mar-13 12:29pm
   
Maybe you can explain what it is that you mean? I do not see any constructors at all in the code you posted that demonstrates your problem.

After a few seconds of Googling I found this:

Send multiple parameters to a thread in C#[^]

Edit:

Also, you can just be creative. I am not sure if this will help you in any way but what if you used an array or a list for the parameter. I am not sure if you can convert those to objects, but if you could, you would have something like:

C#
int ParamaterOne = 2;
string ParameterTwo = "Hello World!";

List<object> ListOfParamaters = new List<object>();
ListOfParamaters.Add(ParamaterOne);
ListOfParamaters.Add(ParamaterTwo);

object TheParamater = (object)ListOfParamaters;


You could in the threaded void you could convert them back:

C#
List<object> TheList = (List<object>)Paramater;
   
v2
SQL
hello... i wanted to know why we cant use 2 constructors while creating threading...?????
   
Comments
[no name] 16-Mar-13 12:29pm
   
Why are you just reposting your vague question as an answer?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900