Exposing class types directly through another class
<p>I have a class called Config with the declaration
<code>public class Config&lt;T&gt; where T : class, new()</code></p>

<p>It contains some methods to save a configuration of type <code>T</code> as well as the actual configuration in property called <code>Configuration</code>.</p>

<p>Is it possible to expose the configuration of type <code>T</code> directly in my Config class without having to go through the <code>Configuration</code> property.</p>

<p>So far, I have a bit of an ugly work around</p>

<pre><code>public T this[int index]
{
    get { return _configuration; }
}
</code></pre>

<p>If not, then I was wondering if it can be done by inheriting from the <code>T</code>, but I'm not clear on the syntax of how to do this.</p>

<p><strong>Edit:</strong><br>
I imagined you could do something like </p>

<pre><code>public T this
{
    get { return _configuration; }
}
</code></pre>
