title: .NET Reflection and an array
body: <p>I'm trying to get the value of a property that is a single dimensional array via reflection</p>
  
  <p>I tried something like this: (try catches removed for clarity)</p>
  
  <pre><code>string[] fieldOrder;
  PropertyInfo fieldOrderColumn;
  
  fieldOrderColumn = targetType.GetProperty("OrderArray");
  
  if (fieldOrderColumn == null)
      throw new Exception(targetType.Name + " the OrderArray is null ");
  
  fieldOrder = (string[])fieldOrderColumn.GetValue(targetType, null);  //what should I use insted of this?
  </code></pre>
  
  <p>Clearly the last line is wrong, and is trying to get a non array object, I assumed a
  quick google and I'd be on my way, but I'm unable to find it. I don't know the lenght of the array at run time.</p>
  
  <p>Any hints or links or help would be greatly appreciated.</p>