system.web.mail vs system.net.mail [duplicate]
What is the difference between Syste开发者_高级运维m.Web.Mail
and System.Net.Mail
?
System.Web.Mail
was in .NET Framework v1.1System.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
精彩评论