title: convert from enum to IEnumerable
body: <p>Can you help me hww to corect this code </p>
  
  <pre><code>using System;
  using System.Collections;
  using System.Collections.Generic;
  using System.Reflection;
  
  namespace NTSoftHRM
  {
  
      // ------------------------------------------------------------------------
      public class EnumValueList&lt;T&gt; : IEnumerable&lt;T&gt;
      {
  
          // ----------------------------------------------------------------------
          public EnumValueList()
          {
              IEnumerable&lt;T&gt; enumValues = GetEnumValues();
              foreach ( T enumValue in enumValues )
              {
                  enumItems.Add( enumValue );
              }
          } // EnumValueList
  
          // ----------------------------------------------------------------------
          protected Type EnumType
          {
              get { return typeof( T ); }
          } // EnumType
  
          // ----------------------------------------------------------------------
          public IEnumerator&lt;T&gt; GetEnumerator()
          {
              return enumItems.GetEnumerator();
             // return ((IEnumerable&lt;T&gt;)enumItems).GetEnumerator();
  
          } // GetEnumerator
  
          // ----------------------------------------------------------------------
          IEnumerator IEnumerable.GetEnumerator()
          {
              return GetEnumerator();
          } // GetEnumerator
  
          // ----------------------------------------------------------------------
          // no Enum.GetValues() in Silverlight
          private IEnumerable&lt;T&gt; GetEnumValues()
          {
              List&lt;T&gt; enumValue = new List&lt;T&gt;();
  
              Type enumType = EnumType;
  
              return Enum.GetValues(enumType);
  
          } // GetEnumValues
  
          // ----------------------------------------------------------------------
          // members
          private readonly List&lt;T&gt; enumItems = new List&lt;T&gt;();
  
      } // class EnumValueList
  
  } 
  </code></pre>
  
  <p>when bulid the error is:
  Cannot implicitly convert type 'System.Array' to 'System.Collections.Generic.IEnumerable'. An explicit conversion exists (are you missing a cast?) at  return Enum.GetValues(enumType)</p>