How to create a dynamic property in this scenario
<p>I have a list which contains dynamic data. i.e</p>

<pre><code>list[0].id=0;
list[1].id=1;
list[2].id=2;
</code></pre>

<p>I want to create a class which will have dynamic property names
i.e</p>

<pre><code>for(int i=0;i&lt;list.count;i++)
{
    //create dynamic class with dynamic property name
    new {id+i=list[i].id} //this statement throws compilation error. 
}
</code></pre>

<p>what is alternative to this method?</p>
