A
Anthony P.
Hello Everyone,
I'm attempting to create a new MailMessage object by following a
tutorial and I can't seem to get it right according to VS 2008. I'm
hoping someone here can help me find out what I am doing wrong. I
would greatly appreciate it:
First, I am importing the System.Net.Mail class like this:
Imports System.Net.Mail
That works fine, no errors.
Now, in the subroutine where I need to create the new MailMessage
object, I am doing this:
Dim msg as Strong
MailMessage msg = new MailMessage()
At this point Visual Studio does two things:
1. It recreates the statement as MailMessage(msg = new MailMessage())
and
2. It throws two errors:
"MailMessage is a type that cannot be used as an expression"
and
"Name 'msg' is not declared'
It simply refuses to build. I am following the tutorial found here:
http://linkslash.com/05a47f
Can anyone help me figure this out?
Thanks!
Anthony
I'm attempting to create a new MailMessage object by following a
tutorial and I can't seem to get it right according to VS 2008. I'm
hoping someone here can help me find out what I am doing wrong. I
would greatly appreciate it:
First, I am importing the System.Net.Mail class like this:
Imports System.Net.Mail
That works fine, no errors.
Now, in the subroutine where I need to create the new MailMessage
object, I am doing this:
Dim msg as Strong
MailMessage msg = new MailMessage()
At this point Visual Studio does two things:
1. It recreates the statement as MailMessage(msg = new MailMessage())
and
2. It throws two errors:
"MailMessage is a type that cannot be used as an expression"
and
"Name 'msg' is not declared'
It simply refuses to build. I am following the tutorial found here:
http://linkslash.com/05a47f
Can anyone help me figure this out?
Thanks!
Anthony