title: Passing Enum as parameter
body: <p>I have this method, </p>
  
  <pre><code>private List&lt;SelectListItem&gt; GetList()
  {
      var values = from LtlAccountType item in 
                   Enum.GetValues(typeof(LtlAccountType))
                   select new SelectListItem 
                   { Text = item.ToString(), Value = item.ToString() };
      return values.ToList();
  }
  </code></pre>
  
  <p>How to pass <code>enum</code> as <code>parameter</code> and return list after querying the <code>enum</code></p>
  
  <pre><code>private List&lt;SelectListItem&gt; GetList(Enum obj)
  {
      var values = from obj item in Enum.GetValues(typeof(obj))
                   select new SelectListItem 
                   { Text = item.ToString(), Value = item.ToString() };
      return values.ToList();
  }
  </code></pre>
  
  <p>I got this error on <code>obj</code></p>
  
  <p><code>Type or namespace name expected</code></p>