KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a class public class Setting<T> { public string name { get; set; } public T value { get; set; } } now I want to create an IList<Setting<T>> but with different types of Setting<T> 's T in it, I want e.G. List<Setting<T>> settingsList; settingsList.Add(new Setting<int>()); settingsList.Add(new Setting<string>()); I've tried IList<Setting<T>> but this seems not possible since the compiler doesn't find Type T . I know that I could use object but I want it to be strongly typed. So my question is if there is a possibility of getting this working.
Tags (comma-separated)
Save Edits
Cancel