I agree that Meta-Knight's inheritance solution is best, however it is possible to do this by manually editing the setting XML file. In Solution Explorer go to: Solution > Project > Properties > Settings.settings. Right-click on Settings.settings and choose "Open With". Select "XML (Text) Editor". Then insert the following inside <Settings>
:
<Setting Name="TestGenericList" Type="System.Collections.Generic.List<int>" Scope="User">
<Value Profile="(Default)" />
</Setting>
save, and it works.
Unfortunately it doesn't appear to work with generic types requiring two or more types, since the comma is not allowed in that attribute. Even entity-encoding it (,
) didn't help.
The following causes an error "Illegal characters in path" when you go to edit the settings file in the settings designer:
<Setting Name="TestGenericDictionary" Type="System.Collections.Generic.Dictionary<string,string>" Scope="User">
<Value Profile="(Default)" />
</Setting>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…