Cannot apply indexing to an expression of type 'T'
<p>I've create a generic method like</p>

<p><code></p>

<pre><code>public void BindRecordSet&lt;T&gt;(IEnumerable&lt;T&gt; coll1, string propertyName)
            where T : class
</code></pre>

<p></code></p>

<p>and in my class 'T' i've write indexer </p>

<pre><code>public object this[string propertyName]
    {
        get
        {
            Type t = typeof(SecUserFTSResult);
            PropertyInfo pi = t.GetProperty(propertyName);
            return pi.GetValue(this, null);
        }
        set
        {
            Type t = typeof(SecUserFTSResult);
            PropertyInfo pi = t.GetProperty(propertyName);
            pi.SetValue(this, value, null);
        }
    }
</code></pre>

<p>now in my method when i write code like </p>

<p><code>
 var result = ((T[])(coll1.Result))[0];
</code></p>

<p><code>
 string result= secFTSResult[propertyName];
</code></p>

<p>I am getting the error
Cannot apply indexing to an expression of type 'T'</p>

<p>Please help
Thanks</p>
