Generic Class Members in C#?
问题 Hey, I think I have the wrong idea here, but I'm not sure what is best. I want a class with a member variable that can be of any type, depending on what is needed at the time. So far, I have something like this: public class ConfigSetting<T> { private T value; public T GetValue() { return value; } public void ChangeValue() { } public ConfigSetting(string heading, string key) { this.value = DerivedMethods.configsettings.SettingGroups[heading].Settings[key].RawValue; } } The type returned by