I am trying to save a List<Foo> using ApplicationSettingsBase, however it only outputs the following even though the list is populated:
<setting name="Foobar" serializeAs="Xml">
<value />
</setting>
Foo is defined as follows:
[Serializable()]
public class Foo
{
public String Name;
public Keys Key1;
public Keys Key2;
...
I thought the Reset() method repopulates the Settings with default values again, but it seems not to. How can I reload them with the default values?
private void buttonLoadDefaultSettings_Click(object sender, EventArgs e)
{
FooSettings.Default.Reset();
// Data grid will show an empty grid after call to reset.
DataGridFoo.R...
I'm looking at some code that uses the .NET System.Configuration.SettingsProvider and ApplicationSettingsBase to handle configuration.
We have a class that derives from SettingsProvider that uses a database as the data store, and then we have other settings classes that inherit from ApplicationSettingsBase, and have the [SettingsProvide...
This is pretty closely related to another SO question.
Using the example below, could someone explain to me why adding a new List<Foo> where each of Foo's properties are explicitly set causes the ApplicationSettingsBase.Save() method to correctly store the data, whereas adding a new Foo to the list via a constructor (where the construct...
When debugging an application I always get the following error when break on exception is enabled in Visual Studio. This is really bugging me, since we work with break on exception. The funny thing is, that it still works when I continue (the StringCollection is loaded).
The Message is:
Could not load file or assembly 'System.XmlSerial...
We have application settings derived from ApplicationSettingsBase. When we push a new version of our app we need to call
//
// Summary:
// Updates application settings to reflect a more recent installation of the
// application.
public virtual void Upgrade();
(from the meta-data)
now there are some tricky ways to de...