title: c# reflection on generic template class
body: <p>Following a sample of my code:</p>
  
  <pre><code>public abstract class&lt;T&gt;
  {
     public List&lt;T&gt; GetSomething(string q)
     {
        **List&lt;T&gt; list = new List&lt;T&gt;();**
  
        Type type = typeof(T);
        PropertyInfo[] props = type.GetProperties(BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.Instance);
  
        foreach (PropertyInfo info in props)
        {
            // at this point I need to return information from a data source query
            // and build the members (set values) according to the returning results
            // which needs to be added to a list that contains T with each property
            // within set to a value. "Some Value" should be an object instance required
            // by the Type of the PropertyInfo.
  
            info.SetValue(type, "Some Value", null);
            **list.Add(type);**
        }
     }
  
     **return list;**
  }
  </code></pre>
  
  <p>info.SetValue(object, object, object[]) is not accessible, due to the template type, correct? My question here would be, how can I set a value on a property, contained within T?</p>
  
  <p>Edit: The question confused even myself. I've amended the procedure above to represent my direct needs.</p>
  
  <p>Thanks,
  Eric</p>