title: C# Cannot resolve symbol
body: <p>I don't know why I'm getting this error. Seems elementary. Anyway I have a singleton class called EmailSender. The code below is short and easy. The issue is that I can't use sender in the MainWindow class. Anything I try such as sender.Send() is treated as though I've done asdafsafas.Send(). It's treated as though it's a random string of characters. Don't know why this is happening.</p>
  
  <pre><code>using System;
  using System.Net.Mail;
  using System.Windows.Forms;
  
  namespace SendMail
  {
      public partial class MainWindow : Form
      {
          #region Private variables
          private MailMessage msg = new MailMessage();
          private EmailSender sender = EmailSender.GetInstance();
          #endregion
  
          public MainWindow()
          {
              InitializeComponent();
  
          }
  
          private MailMessage PrepareMailMessage()
          {
  
              return msg;
          }
  
          private void btnSend_Click(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>Here is the GetInstance method:</p>
  
  <pre><code>public static EmailSender GetInstance()
  {
      return _instance ?? (_instance = new EmailSender());
  }
  </code></pre>