Page 1 of 1

Do I need to delete dictionary save?

Posted: Wed Jun 10, 2020 10:47 am
by Johnny Star
Hello, can I check for overwriting a dictionary save do I need to delete it first?

Code: Select all

        if (item.GetType() == typeof(Sharks))
        {
            userSharksDatabase.AddNewKey((Sharks)item);
            // Overwrite the keys.
            ES3.DeleteKey("UserSharksDatabaseList");
            ES3.Save<Dictionary<string, string>>("UserSharksDatabaseList", userSharksDatabase.UserSharksDatabaseDictionary);
        }

Re: Do I need to delete dictionary save?

Posted: Wed Jun 10, 2020 10:53 am
by Joel
Hi there,

Keys are automatically overwritten when writing to a file, so you don't need to delete it beforehand.

All the best,
Joel

Re: Do I need to delete dictionary save?

Posted: Wed Jun 10, 2020 1:58 pm
by Johnny Star
Thank you!! :D