如何实现后台进程 [英] How to implement background process

查看:72
本文介绍了如何实现后台进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#中运行后台进程?我的要求是从应用程序中触发一个超过30分钟的过程。我必须时不时地在屏幕上显示进程的更新状态。有人可以建议我实施这个选项吗?我在应用程序中使用了WCF服务。

How to run a background process in C# ? My requirement is to trigger a process from application which will run more than 30 mins . I have to show the updated status of process on screen every now and then. Could anyone suggest me a option in implementing this ? I have used WCF service in app.

推荐答案

我建​​议使用后台工作者类。



一个例子是 BackgroundWorker Class Sample for Beginners [ ^ ]



但是如果你谷歌它有很多其他非常好的教程。
I would suggest using the Background Worker class.

An example is here BackgroundWorker Class Sample for Beginners[^]

But if you google it there are alot of other really good tutorials.


这篇关于如何实现后台进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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