title: Does C# support "Generic inheritance" and how/why?
body: <p>I want to declare something similar to this:</p>
  <pre><code>public class ImpostorClassWithAddedNotificationSupport&lt;T&gt; : T, ICustomTypeProvider, INotifyPropertyChanged where T : class
  </code></pre>
  <p>But I receive this error:</p>
  <blockquote>
  <p>CS0689: Cannot derive from 'T' because it is a type parameter</p>
  </blockquote>
  <p>I would like to dynamically add new behavior to properties (overwrite base class properties) with my class. Each property of my class would call base class property then add notification to it. I would also add more functionalities (methods). This way, everything would works fine in design but have additional functionality to the derived class. It is a kind of impersonation (impostor) to add more functionalities.</p>
  <p>Is there a way to dynamically overwrite a type in order to add functionalities (functionality like for example Notification)? If yes, how? If no, why?</p>
  <p><strong>My initial intention is:</strong></p>
  <p>I try to do a FakeObject that mimics any object I'd like to edit. It would dynamically create all properties of any object it mimics. Then I could edit that &quot;FakeObject&quot; and if I want to cancel, I flush that fakeObject and my original object has never been modified (like a &quot;Cancel&quot; on any dialog). On &quot;Ok&quot;, it would apply changes to the original object. It already works for a PropertyGrid because PropertyGrid use reflection behind to discover and read/write properties. But I want to use my class at design time with <a href="https://en.wikipedia.org/wiki/Windows_Presentation_Foundation" rel="nofollow noreferrer">WPF</a> and <a href="https://en.wikipedia.org/wiki/Windows_UI_Library" rel="nofollow noreferrer">WinUI</a>. The notification part is only a bonus that would come with it. Otherwise I have to write a &quot;Copy constructor&quot; or any similar copy mechanism    and also I have to implement INotifyPropertyChanged on each and every classes. I would prefer to keep my classes &quot;Plain&quot; - <a href="https://en.wikipedia.org/wiki/Plain_Old_CLR_Object" rel="nofollow noreferrer">POCO</a>. I would saved all of that if I would be able to write my code as intended.</p>
  <p><strong>What I realise after I asked</strong></p>
  <p>It is not possible actually. I should ask Microsoft for a new feature.</p>