title: Set anonymous type to null
body: <p>I know it's not allowed to set an nonymous type to null, but how do I solve this:</p>
  
  <pre><code>var products = null; //this cant be null, but somehow it must be declared in this outer scope, and not only inside the try-catch scope
  
      try
       {
           products = (from p in repository.Products
                       select new { p.Product, p.ProductName }).ToList();
       }
       catch (Exception e)
       {  
         return;
       }
  Console.WriteLine(products.FirstOrDefault().ProductName)
  </code></pre>