I'm trying to save a List<T>
into the settingsfile of my project.
I've edited the settings.settings file and added
<Setting Name="CustomTabs" Type="System.Collections.Generic.List<CustomTabItem>" Scope="User">
<Value Profile="(Default)" />
</Setting>
and edited the settings.designer.cs too
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public global::System.Collections.Generic.List<CustomTabItem> CustomTabs {
get {
return ((global::System.Collections.Generic.List<CustomTabItem>)(this["CustomTabs"]));
}
set {
this["CustomTabs"] = value;
}
}
So the Listtype is available in the settings-gui.
Now if I make Properties.Settings.Default.CustomTabs.Add(tab);
The list gets filled, however if I call Save();
and restart the App, the list ist empty again.
Am I missing something to make it work? I'm using Visual Studio 2015.