title: Error using Container Class
body: <p>The Class that is using the container is throwing an error on AmountList and PGRow that says <code>AmountList is inaccessible due to its protection level</code> </p>
  
  <p>The Code </p>
  
  <pre><code>public virtual ActionResult getAjaxPGs(string SP = null, string PG = null)
  {
  
      if (SP != null)
      {
  
          Container container = new Container();
          var PGList = from x in db.PG_mapping
                       where x.PG_SUB_PROGRAM == SP 
                       select x;
  
          container.PARow = PGList.Select(x =&gt; new { x.PG }).Distinct().ToArray();
  
         container.AmountList = from x in db.Spend_Web
                          where x.PG == PG
                          group x by new { x.ACCOUNTING_PERIOD, x.PG, x.Amount } into pggroup
                          select new { accounting_period = pggroup.Key.ACCOUNTING_PERIOD, amount = pggroup.Sum(x =&gt; x.Amount) };
  
        return Json(container, JsonRequestBehavior.AllowGet);
      }
  
      return View();
  }
  
  public class Container
  {
      Array PARow;
      Array AmountList;
  
  }
  </code></pre>
  
  <p>I tried making the class public, do I have to do something else to make the class accessible to <code>getAjaxPGs</code>?? </p>