Is there anything im doing wrong?

void SaveProxies()
        {
            string[] items = new string[Proxies.Items.Count];
            Proxies.Items.CopyTo(items, 0);
            string saveValue = string.Join(",", items);
            Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.Proxies = saveValue;
        }

        void LoadProxies()
        {
            string[] items = Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.Last.Split(',');
            foreach (string str in items)
                Proxies.Items.Add(str);
        }

I use LoadProxies to load the save, from the settings.

then to save I use SaveProxies, to save to settings.

Dani AI

Generated

You were close — spotted the immediate issues — the saved settings must be persisted and you should load the correct setting. Beyond that, there are a few practical improvements that make this robust and safe long-term.

Store the list as a user-scoped StringCollection instead of serializing to a single comma string. That avoids delimiter problems (items containing commas), makes trimming/simple validation easier, and is supported directly by the Settings designer. Example save/load pattern (assumes the Proxies setting is a System.Collections.Specialized.StringCollection with User scope):

void SaveProxies()
{
    var col = new System.Collections.Specialized.StringCollection();
    foreach (var obj in Proxies.Items)
        col.Add((obj ?? string.Empty).ToString());
    Properties.Settings.Default.Proxies = col;
    Properties.Settings.Default.Save();
}

void LoadProxies()
{
    Proxies.Items.Clear();
    var col = Properties.Settings.Default.Proxies;
    if (col == null) return;
    foreach (string s in col)
        if (!string.IsNullOrWhiteSpace(s))
            Proxies.Items.Add(s.Trim());
}

Extra notes and troubleshooting:

  • Confirm the Proxies setting is declared in Project → Properties → Settings as type StringCollection and scope User. Application-scoped settings cannot be changed at runtime.
  • If you keep the single-string approach, split with StringSplitOptions.RemoveEmptyEntries and Trim() each entry; prefer newline as a delimiter or use JSON if you need structure.
  • Clear the ListBox before loading to avoid duplicates. If the ListBox is data-bound, update the underlying collection instead of manipulating Items.
  • If proxies include credentials, do not store them in plain text — use DPAPI/ProtectedData or a secure store.

These steps prevent subtle bugs and make the save/load behavior reliable across runs and future changes.

You are making 2 mistakes. Firstly, you didn't save the Settings. Add this to the SaveProxies() method:

Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.Save();

Secondly, you are loading the wrong settings. You are loading "Last" instead of "Proxies". Replace it:

string[] items = Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.[B]Proxies[/B].Split(',');

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.