0

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.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by farooqaaa
0

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

Edited by farooqaaa: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.