Invalid token 'in' class, struct, or interface member declaration
<p>I am trying to send a file via asp.net webapp.</p>

<p>I am getting the following error 8 times, with diffrent symbols from my code:
Invalid token '=' in class, struct, or interface member declaration</p>

<p>It feels like I am missing a function, but I am not sure.</p>

<p>This is my whole .cs class code:</p>

<pre><code>// A namespace does not directly contain members such as fields or methods

namespace vCardGenerator.Website
{
public partial class SendvCard
{
    public void Mailvcard()
    {

//Class SendMail.cs
/*          
                string txtFile = txtFile.Text;
                string strDir = "C:\\local\\vCardGenerator.Website"; //temp save location
                string strFilename = Path.GetFileName(txtFile.PostedFile.FileName);

                txtFile.PostedFile.SaveAs(strDir + strfilename);
                mail.Attachments.Add(new MailAttachment(strDir + strFilename));
                //Error with MailAttachment/MailAddress??

                MailAddress;
                if (useOverrideIfDebug &amp;&amp; AppSettings.EmailToAddressOverride.Length &gt; 0)
                    to = new MailAddress(AppSettings.EmailToAddressOverride, recipient.DisplayName);
                else
                    to = recipient;

                Exception error = null;
                foreach (string server in AppSettings.SmtpServers)
                {   

*/
Mailer smtp = new Mailer(server);
}
    smtp.AddAttachment = (@"C:\\Desktop\\FirstName_FamilyName.vcf");
    smtp.FromAddress = "email";
    smtp.Subject = "vCard";
    smtp.MailBody = "vCard is added as file";
    smtp.AddRecipient = txtMail.Text;

//to = txtMail.Text;
    try
    {
        SmtpMail.Send();
    }
    catch (exception ex)
    {
        Responds.Write("Exception Occured:   " + ex);
    }
// Responds.Write("FAiled, try again please!")
    finally
    {
        Responds.Write("De vCard has been sent succesfully!");
    }
// delete vcard
    //  File.Delete(@"C:\\Bureaublad\\") + ("FirstName_LastName.vcf");
        File.Delete(strDir + strFilename);
}
</code></pre>

<p>I am a beginner with this and would appreciate a hint on how to solve this, because Google fails me again and I am literally searching half a day for it.
But You got to start somewhere right?</p>

<p>Thanks in Advance,</p>
