title: Return type for a List
body: <p>Hi I need to find a way to declare an anonymous type for a method.This is my code:</p>
  
  <pre><code>public List&lt;var&gt; ListOfProducts(string subcategory)
  {
      var products = (from p in dataContext.Products
                      join s in dataContext.SubCategories.Where(x =&gt; x.SubCatName == subcategory)
                          on p.SubcatId equals s.SubCatId
                      join b in dataContext.Brands on p.BrandId equals b.BrandId
                      select new
                      {
                          Subcategory = s.SubCatName,
                          Brand = b.BrandName,
                          p.ProductName,
                          p.ProductPrice
                      });
      return products;
  } 
  </code></pre>
  
  <p>I don't know what type should I set the List for the method.What should I do in this case?</p>