Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello dear friends..


thread th2 = new Thread(new ThreadStart(this.check(int,Char,int, int)));
th2 .Priority = ThreadPriority.Highest;

th2.start();


Error CS0149 : Method name expected
Posted

You can solve this by using a lambda expression:
C#
Thread th2 = new Thread(() => this.check(yourInt1, yourChar, yourInt2, yourInt3));
th2.Priority = ThreadPriority.Highest;
th2.Start();

Note that you should give the variable names as arguments here, not their type.
 
Share this answer
 
v2
Comments
agent_kruger 18-Aug-14 6:29am    
+5, nice answer sir
Thomas Daniels 18-Aug-14 6:30am    
Thank you!
agent_kruger 18-Aug-14 6:30am    
you're welcome sir
Cross-post. This is open in C# discussions, so please leave it there.
 
Share this 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