title: C# Reflection : how to get an array values & length?
body: <pre><code>FieldInfo[] fields = typeof(MyDictionary).GetFields();
  </code></pre>
  
  <p><code>MyDictionary</code> is a static class, all fields are string arrays.</p>
  
  <p>How to get get the Length value of each array and then itearate through all elements ?
  I tried the cast like:</p>
  
  <pre><code>field as Array
  </code></pre>
  
  <p>but it causes an error </p>
  
  <blockquote>
    <p>Cannot convert type 'System.Reflection.FieldInfo' to 'System.Array'
    via a reference conversion, boxing conversion, unboxing conversion,
    wrapping conversion, or null type conversion</p>
  </blockquote>