 <p>Simply put you can't. There are a couple of approaches to work around this problem though.</p> <p>The most common is to use an interface. Say <code>IMyType</code></p> <pre><code>interface IMyType { void foo(); } class A : IMyType ... class B : IMyType ... void bar&lt;T&gt;(T t) where T : IMyType { t.Foo(); } </code></pre> <p>This is a bit heavy weight though is it requires a metadata change for a solution. A cheaper approach is to provide a lambda expression which calls the appropriate function.</p> <pre><code>void bar&lt;T&gt;(T t, Action doFoo) { ... doFoo(); } var v1 = new A(); var v2 = new B(); bar(v1, () =&gt; v1.Foo()); bar(v2, () =&gt; v2.Foo()); </code></pre>