Created
June 12, 2010 10:33
-
-
Save kkozmic/435622 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IReference<out T> {} | |
public class ComponentReference<T> : IReference<T> {} | |
// somewhere | |
public static IReference<IInterceptor> ForType<T>() where T:IInterceptor | |
{ | |
// this won't compile | |
return new ComponentReference<T>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment