hai
i want send mail to my client at everyday 10.00 pm..
how to finish this task using thread in c# WinForm
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bikesh SrivastavaPosted Dec 21, 2016, 12:33 PM
Tapan PatelPosted Dec 21, 2016, 12:19 PM
Mangesh GPosted Dec 21, 2016, 7:32 AM
snowal rajPosted Dec 21, 2016, 6:41 AM
Mangesh GPosted Dec 21, 2016, 6:38 AM
so to use simple threading In your application
You can do this
Public void SendMail()
{
//Mail sending code
}
and to call this Thread
Thread thsendmail= new Thread(SendMail)
thsendmail.Start()
another approach is to use the delegates in this You can define the delegates
//Declare the Delegate
Public delegate void sendMail(EmailObject );
To Call this delegate You can use the
sendMail Objdelegatesendmail= new sendMail()
IAsynchResult ia= Objdelegatesendmail.BeginInvoke(EmailObject,null,null );
Here First null is the CallBack Method if u need somethings