开发者

system.web.mail vs system.net.mail [duplicate]

开发者 https://www.devze.com 2023-02-23 06:05 出处:网络
This question already has answers here: .net: System.Web.Mail vs System.Net.Mail (7 answers) Closed 9 years ago.
This question already has answers here: .net: System.Web.Mail vs System.Net.Mail (7 answers) Closed 9 years ago.

What is the difference between Syste开发者_高级运维m.Web.Mail and System.Net.Mail?


  • System.Web.Mail was in .NET Framework v1.1

  • System.Net.Mail is in .NET Framework v2.0 onwards

They are both used for the same purpose. If you use System.Web.Mail it only shows a warning, saying this is deprecated. It still works as supposed to.

If you are really using higher version (2.0 or later) of .NET framework, then use System.Net.Mail.


First line in MSDN for the System.Web.Mail namespace:

The classes in this namespace have been deprecated. Use the System.Net.Mail namespace instead

0

精彩评论

暂无评论...
验证码 换一张
取 消