我们可以在C#中使用类似于线程的过程吗 [英] can we use process like thread in c#

查看:92
本文介绍了我们可以在C#中使用类似于线程的过程吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

老兄,



我们可以指定一种处理方法吗?


私有void selectData(int max,int min)
{
从表中选择*,其中rownum> min和rownum<最大值;
}


进程s1 =新进程(selectData(1,15);
s1.start();

进程s2 =新进程(selectData(16,30);
s1.start();

我们该怎么办?如果不是的话,您可以帮我吗.

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.

推荐答案

您不能将方法分配为过程. Process组件是用于启动,停止,控制和监视应用程序的有用工具.检查链接以获取更多信息:
http://msdn.microsoft.com/en-us/library/system.diagnostics. process.aspx [^ ]

您想要的是使用线程完成的.

祝你好运!
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!


这篇关于我们可以在C#中使用类似于线程的过程吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆