Do I need to delete dictionary save?

Discussion and help for Easy Save 3
Post Reply
Johnny Star
Posts: 29
Joined: Sat Mar 21, 2020 2:17 pm

Do I need to delete dictionary save?

Post 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);
        }
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Do I need to delete dictionary save?

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Johnny Star
Posts: 29
Joined: Sat Mar 21, 2020 2:17 pm

Re: Do I need to delete dictionary save?

Post by Johnny Star »

Thank you!! :D
Post Reply