C#中的背景 [英] background in c#

查看:79
本文介绍了C#中的背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c#中背景的目的是什么?
每隔24小时我们可以使用后台而不是服务来执行任何功能吗?

what is the purpose of background in c#??
can we use background instead of service to execute any function after every 24 hours??
if so how to do that?

推荐答案

您的问题尚不清楚,但是线程的重点是允许完成工作而不会冻结用户界面,有时更复杂的工作得益于许多线程,但是值得记住的是,没有线程可以使您的计算机更快.我不知道您所说的背景"是什么意思,但是如果您的应用未运行,则您的功能将无法运行,并且编写每日执行的功能的最佳方法是使用服务.
Your question is not clear, but the point of threads is to allow work to be done without freezing the user interface, and sometimes more complex work benefits from many threads, although it''s worth remembering that no thread makes your computer faster. I don''t know what else you mean by ''background'', but if your app is not running, then your function cannot run, and the best way to write a daily executed function is with a service.


您是说BackgroundWorker类吗?这是应用程序的一部分.服务本身就是一种特殊的应用程序.您无法通过这种方式将两者相互比较.

祝你好运!
Do you mean a BackgroundWorker class? This is a part of an application. A service is a special kind of application by itself. You cannot compare the two with each other in that way.

Good luck!


这篇关于C#中的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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