Dynamically access to a PropertyInfo whose Type is IEnumerable<customClass>
<p>I got this code thats works :</p>

<pre><code>var assembly= Assembly.LoadFrom("D:\\...\\mydll.dll");
Type rmType = assembly.GetType(specific_class_with_namespace);
bject MyObjj = Activator.CreateInstance(rmType);
PropertyInfo[] pi = rmType.GetProperties();

foreach(PropertyInfo prop in pi)
{
    Console.WriteLine("Prop: {0}",  prop.Name);
}
</code></pre>

<p>The thing is that the property I wanna access to is a <code>IEnumerable&lt;IWidget&gt;</code>, where <code>IWidget</code> is an internal class of my dll. So in my current code I can't test the <code>Type</code> of my <code>PropertyInfo</code> (and cast it right ? :/)
The final objective is to access to the <code>Name</code> property of my <code>IWidget</code>. Something like :</p>

<pre><code>foreach(var widget in myProperty)
{
    string widgetName = widget.Name;
}
</code></pre>

<p>I read a couple of tutorials on the web and some questions here on SO, but none helped me for my <code>IEnumerable&lt;customType&gt;</code> problem :/</p>

<p>EDIT :</p>

<p>when I do :</p>

<pre><code>PropertyInfo ItemsProperty = rmType.GetProperty("Items");
var ItemsPropertyValue = ItemsProperty.GetValue(rmType, null);
</code></pre>

<p>I can a <code>XamlParseException</code> with the "most" InnerException being "Object does not match target type"...</p>
