Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi techies,



can we assign a method for process,


private void selectData(int max,int min)
{
select * from table where rownum>min and rownum < max;
}


process s1 = new process(selectData(1,15);
s1.start();

process s2 = new process(selectData(16,30);
s1.start();

like shall we do? if not can you help me.
Posted

1 solution

You cannot assign a method as a process. The Process component is a useful tool for starting, stopping, controlling, and monitoring applications. Check the link for more info:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^]

What you want is done with threads.

Good luck!
 
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