.NET Fiddle

CSharp · Console

/Program.cs

using System;
		
public interface IFoo { }

public interface IFooWrapper<out I> where I : IFoo { }

public class Foo : IFoo { }
public class FooWrapper : IFooWrapper<Foo> { }

class Tester 
{
	void Test()
	{
		IFooWrapper<IFoo> foo = new FooWrapper();
	}
}
;