如何在C#winform中使用线程 [英] How to use thread in C# winform
本文介绍了如何在C#winform中使用线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i希望在每天晚上10点向我的客户发送邮件..
如何使用c#WinForm中的线程完成此任务
我尝试了什么:
Thread thread = new 线程( new ThreadStart(SendMail));
thread.Start();
解决方案
我认为你需要的是一个调度程序而不是线程,请查看:< a href =http://www.aspsnippets.com/Articles/Automatically-send-emails-daily-at-specific-time-using-Windows-Service-in-C-and-VBNet.aspx>自动发送电子邮件每天在特定时间使用C#和VB.Net中的Windows服务 [ ^ ]
在我看来,使用 Windows任务计划
r是一个更好的选择。
hai
i want send mail to my client at everyday 10.00 pm..
how to finish this task using thread in c# WinForm
What I have tried:
Thread thread = new Thread(new ThreadStart(SendMail));
thread.Start();
解决方案
I think what you need is a scheduler not thread, check this out: Automatically send emails daily at specific time using Windows Service in C# and VB.Net[^]
In my humble opinion, using the Windows Task Schedule
r is a better option.
这篇关于如何在C#winform中使用线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文