Asynchronously sending Emails in C#?

后端 未结 10 1436
礼貌的吻别
礼貌的吻别 2020-11-28 23:43

I\'m developing an application where a user clicks/presses enter on a certain button in a window, the application does some checks and determines whether to send out a coupl

10条回答
  •  囚心锁ツ
    2020-11-29 00:14

    Using the Task Parallel Library in .NET 4.0, you can do:

    Parllel.Invoke(() => { YourSendMailMethod(); });
    

    Also, see cristina manu's blog post about Parallel.Invoke() vs. explicit task management.

提交回复
热议问题