Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Array List to Application Settings.

Array List to Application Settings.

Scheduled Pinned Locked Moved C#
data-structurestutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Herboren
    wrote on last edited by
    #1

    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);

            }
        }
    
    N S 2 Replies Last reply
    0
    • H Herboren

      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);

              }
          }
      
      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • H Herboren

        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);

                }
            }
        
        S Offline
        S Offline
        Subin Mavunkal
        wrote on last edited by
        #3

        whats the issue you are facing ?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups