How to select <T> in static function
<p>I have a class Student , inside there is a property <code>Studentname</code> and <code>address</code> .</p>

<p>I also have a static function like below for me to filter student by <code>address(living area)</code></p>

<pre><code>public static List&lt;T&gt; FilterByAddress&lt;T&gt;(List&lt;T&gt; StudentList, string address )
    {
       Type typeParameterType = typeof(T); // it is returning Student 
       StudentList = StudentList.FindAll(x =&gt; x.address == address );            
       return StudentList;
    } 
</code></pre>

<p>I am getting an error on this part of code "x.address" which is Error   42 'T' does not contain a definition for 'Studentname' and no extension method 'Studentname' accepting a first argument of type 'T' could be found (are you missing a using directive or an assembly reference?)</p>

<p>how can I solve this by making T recognize as the student class ? </p>
