I am doing a UserControl where anyone can plugin a List.
Internally that List is sorted and programmatically added are the items to a internal ItemaSource.
Anyone who wants to use this UserControl must use the Property ElementsDataSource
public List<T> ElementsDataSource {get;set;} List<T> is not working/compiling, instead I have to use List<object>.
But then I have to cast the objects inside the ElementsDataSource again to the generic type when I sort them internally and reuse them etc...
How can I offer a generic List Property to my user just like .NET is doing it?
Maybe my user is plugin in a List<Customer> or List<Department> etc... or am I totally wrong and should use List<Object> ?