Created
December 21, 2016 17:30
-
-
Save Kritner/b558e7f9a4da28d97e2318ac1a02a781 to your computer and use it in GitHub Desktop.
Generics vs interfaces? What does it get me?
This file contains 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 IFoo { } | |
public class Something<TFoo> | |
where TFoo : IFoo | |
{ | |
public void DoSomething(TFoo foo) | |
{ | |
} | |
} |
This file contains 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 IFoo { } | |
public class Something | |
{ | |
public void DoSomething(IFoo foo) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment