count objects of a certain type in a collection and use this as a string in a textbox
<p>I want to fill a textbox with the count+1 of a kind of figure in a collection.
The collection is a Generic List of Figure, figure is an instance of a certain type of Figure.</p>

<p>The following works:</p>

<pre><code>txtName.Text = figures.OfType&lt;Square&gt;().Count().ToString();
</code></pre>

<p>but the following doen't</p>

<pre><code>txtName.Text = figures.OfType&lt;figure.GetType()&gt;().Count().ToString();
</code></pre>

<p>I get the error "operator '>' can not be applied to operands of type 'method group' and 'System.Type'".
What do i have to do to make this work ?</p>
