Type safety through inheritance (2)
<p>This is an extension to my previous question: <a href="http://stackoverflow.com/questions/15186267/type-safety-through-inheritance">Type safety through inheritance</a></p>

<p>I created a new question instead of updating my old as this one dives deeper into this topic.</p>

<p>My original purpose was to declare a method that returns an object of the implementing classes type. One such method might look like <code>GetSimpleClone()</code> in the following:</p>

<p>I have a base interface <code>IEntity</code> that declares the method <code>GetSimpleClone()</code> and is implemented by several other interfaces, for example <code>IPerson</code>.</p>

<pre><code>public interface IEntity&lt;T&gt; : where T : IEntity&lt;T&gt;
{
   T GetSimpleClone();
}

public interface IPerson : IEntity&lt;IPerson&gt;
{
}
</code></pre>

<p>The interface <code>IAddress</code> also implements <code>IEntity</code>. However another interface <code>IVenue</code> inherits from <code>IAddress</code>. As I described in the beginning, I want the <code>GetSimpleClone()</code> method in <code>IAddress</code> to return an object of type <code>IAddress</code> while the same method in <code>IVenue</code> should return an object of type <code>IVenue</code>. Therefore the declaration of <code>IAddress</code> differs from <code>IPerson</code> as it has to declare a generic type itself:</p>

<pre><code>public interface IAddress&lt;T&gt; : IEntity&lt;T&gt; where T : IAddress&lt;T&gt;
{   
}

public interface IVenue : IAddress&lt;IVenue&gt;
{
} 
</code></pre>

<p>Now the problem is that <code>IPerson</code>has a reference to <code>IAddress</code> and understandably the compiler forces me to define the generic type of <code>IAddress</code>.</p>

<pre><code>public interface IPerson : IEntity&lt;IPerson&gt;
{
   IAddress&lt;"Compiler: Define Type!!"&gt; Address { get; set; }
}
</code></pre>

<p>I really can't see a solution to this problem and would appreciate any help from you, even if it is just to say that there is simply no solution. :)</p>

<p>Thanks in advance...</p>
