title: The name 'BankAccounts' does not exist in the current context
body: <p>So I'm a beginner with c# experimenting with the Microsoft.Office.Interop.Excel reference, and I've ran into an issue. Here's my main form:</p>
  
  <pre><code>public partial class Form1 : Form
  { 
      public Form1()
      {
          InitializeComponent();
      }
  
      public void Form1_Load(object sender, EventArgs e)
      {
          var BankAccounts = new List&lt;Account&gt;
          {
              new Account
              {
                  ID = 345,
                  Balance = 541.27
              },
              new Account
              {
                  ID = 123,
                  Balance = -127.44
              }
          };
      }
  
      public void button1_Click(object sender, EventArgs e)
      {
          ThisAddIn.DisplayInExcel(BankAccounts, (Account, cell) =&gt;
          // This multiline lambda expression sets custom processing rules  
          // for the bankAccounts.
          {
              cell.Value = Account.ID;
              cell.Offset[0, 1].Value = Account.Balance;
              if (Account.Balance &lt; 0)
              {
                  cell.Interior.Color = 255;
                  cell.Offset[0, 1].Interior.Color = 255;
              }
          });
  
      }
  }
  </code></pre>
  
  <p>Returns the error: </p>
  
  <blockquote>
    <p>The name 'BankAccounts' does not exist in the current context</p>
  </blockquote>
  
  <p>I can't understand how this is happening, could someone please help me fix this and perhaps explain what's caused it?</p>
  
  <p>Thanks a lot!</p>