I am facing a problem with .NET generics. The thing I want to do is saving an array of generics types (GraphicsItem):
public class GraphicsItem<T> { private T _item; public void Load(T item) { _item = item; } }
How can I save such open generic type in an array?
Implement a non-generic interface and use that:
Then use that interface as the item in the list: