Thomas

Thomas

  • NA
  • 1
  • 0

saving Hashtable/Arraylist in settings

Jul 18 2006 5:52 AM
Hi,

I would like to save a hashtable or an arraylist in the usersettings. How can I do this?!

I tried to add a setting with the type of Hashtable. By running the application I can write and read the Information, but after closing the form, the table isn't saved?!?

<Code>

public override System.Collections.Hashtable Tables

{

get

{

if (mySettings == null)

mySettings = new ModuleFH.Properties.Settings();

return mySettings.Tables;

}

set

{

if (mySettings == null)

mySettings = new ModuleFH.Properties.Settings();

if(mySettings .Tables!=null)

foreach (string key in mySettings.Tables.Keys)

Console.WriteLine("Key: " + key + " Value: " + mySettings.Tables[key]);

mySettings.Tables = value;

mySettings.Save();

}

}


</Code>