导入System.Web.Mail问题 [英] Imports System.Web.Mail Problem

查看:70
本文介绍了导入System.Web.Mail问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程的新手.

尝试编写一个小的程序,该程序将发送电子邮件.

但是,导入System.Web.Mail会生成命名空间不包含公共成员...等"

谷歌搜索此问题表明我需要添加一个引用... System.Web.dll,我认为我已经通过Project>参考并将System.Web添加到参考列表.

但是我仍然收到错误消息.关于我在做什么错的任何想法吗?

谢谢
Gary Vogel

I am a novice at programming.

Trying to write a small program that will send out an email.

However, the Imports System.Web.Mail generates a "Namespace does not contain a public member...etc"

Googling this problem indicates that I need to add a reference...System.Web.dll which I think I have done through Project > Reference and adding System.Web to the reference list.

But I still get the error message. Any thoughts on what I am doing wrong??

Thanks
Gary Vogel

推荐答案

使用

Use

Imports System.Net.Mail


谢谢!我会尝试一下.
但是,我很好奇...关于为什么添加引用不允许System.Web.Mail起作用的任何想法?
再次感谢
加里·沃格尔(Gary Vogel)
Thanks!! I will give that a try.
But, I am curious...any thoughts on why adding the reference did not allow System.Web.Mail to work??
Thanks again
Gary Vogel


这篇关于导入System.Web.Mail问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆