Last active
August 29, 2015 14:15
-
-
Save AlphaModder/a3daf1df7c96ff642f98 to your computer and use it in GitHub Desktop.
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 class SomethingGeneric<T> : SomethingNonGeneric | |
{ | |
public void DoSomething(T parameter); | |
} | |
public interface SomethingNonGeneric { } | |
public class SomethingStorage | |
{ | |
private List<SomethingNonGeneric> somethings = new List<SomethingNonGeneric>(); | |
public void AddSomething(SomethingNonGeneric something) | |
{ | |
somethings.Add(something); | |
} | |
public Something<T> GetSomething<T>(int index) | |
{ | |
return (Something<T>)somethings[index]; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment