I'm using C# with .NET 3.5.
I am using the System.Configuration.ApplicationSettingsBase class to load and save application settings. One of the settings I would like to preserve is an in-memory System.Data.DataTable. The DataTable contains just two columns of type UInt32 and System.Net.IPAddress, respectively. When I call the Save() function on the ApplicationSettingsBase, I get the following exception:
InvalidOperationException: System.Net.IPAddress cannot be serialized because it does not have a parameterless constructor.
If I just use a System.Net.IPAddress object as the setting instead of the DataTable, I do not have a problem. There's something about it being in the DataTable that is causing the exception.
Any ideas what might be going on? Any ideas on how to fix it?