Array List to Application Settings.
-
I have created an array list to save my listview settings but cannot seem to figure out how to save it to an a preset setting in my properties. This is what I have so far.
List list;
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
list = new List();
foreach (ListViewItem lvi in lv.Items)
{
string[] values = new string[] { lvi.Text, lvi.SubItems[1].Text, lvi.SubItems[2].Text, lvi.SubItems[3].Text };
list.Add(values);} }
-
I have created an array list to save my listview settings but cannot seem to figure out how to save it to an a preset setting in my properties. This is what I have so far.
List list;
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
list = new List();
foreach (ListViewItem lvi in lv.Items)
{
string[] values = new string[] { lvi.Text, lvi.SubItems[1].Text, lvi.SubItems[2].Text, lvi.SubItems[3].Text };
list.Add(values);} }
Read this[^] for information on how it should be done.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
I have created an array list to save my listview settings but cannot seem to figure out how to save it to an a preset setting in my properties. This is what I have so far.
List list;
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
list = new List();
foreach (ListViewItem lvi in lv.Items)
{
string[] values = new string[] { lvi.Text, lvi.SubItems[1].Text, lvi.SubItems[2].Text, lvi.SubItems[3].Text };
list.Add(values);} }
whats the issue you are facing ?