title: Unable to cast object of type 'System.Reflection.RuntimePropertyInfo'
body: <p>I have library and console program. The program dynamically load library. In library exist byte array. I try get this array. In program:</p>
  
  <pre><code>MemberInfo[] ByteArrayFile = HtmlPackage.GetMember("HtmlFile");
  FieldInfo field;
  try
  {
     field = (FieldInfo)ByteArrayFile[0];//throw exception here
  }
  catch (Exception e)
  {
    String err = e.ToString();
    throw e;
  }
  byte[] HtmlFileArray = (byte[])field.GetValue(htmlPackage);
  </code></pre>
  
  <p>This error throw exception:</p>
  
  <blockquote>
    <p>"System.InvalidCastException: Unable to cast object of type 'System.Reflection.RuntimePropertyInfo' to type 'System.Reflection.FieldInfo'.\r\n   at ...</p>
  </blockquote>
  
  <p>So how it's fixed?</p>