title: reflection get value from all types in DLL
body: <p>I'm trying to load a DLL and for each type, display the property names and values. I have the following code, which throws a System.Reflection.TargetException with the message "Object does not match target type". </p>
  
  <pre><code>var DLL = Assembly.LoadFrom(PathToDLL);
                  foreach (Type type in DLL.GetTypes())
                  {
                      foreach (PropertyInfo property in type.GetProperties())
                      {
                          lstProperties.Items.Add(string.Format("{0} - {1}", property.Name, property.GetValue(DLL, null)));
                      }
                  }
  </code></pre>
  
  <p>I've tried using type, DLL and null with the GetValue() call, What am I doing wrong?</p>
  
  <p>The DLL I'm testing against has one property:</p>
  
  <pre><code>public string TheValue{ get; set; }
  </code></pre>
  
  <p>thanks all.</p>