-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ini Remove method leaves the key behind #47
Comments
Hi @ixm7 This is the first I've seen of this (sorry, for some reason the default notification setup on GitHub for owners is only for security alerts ): but I've updated on this repo!) I assume this is still an issue? I'll investigate shortly. |
@ixm7 are you sure you have the correct project here? There's no However, if you were doing: gINIFile["mySection"].Remove("myKey"); you'd be correct that the behavior was to set the key value to null (leaving the key in place, which is valid INI syntax, but, as you say, not expected) I've just done a release to resolve this (2.0.51) - please update when it suits you (: You can now do: gINIFile["mySection"].Remove("myKey");
gINIFile.RemoveValue("mySection", "myKey");
giniFile.RemoveValue("mySection", "myKey", true); // will remove the section too, if it's empty (ie, last value was removed) All of the above return Thanks for the report. |
Thanks! |
The ini Remove method deletes the key value but leaves the key behind.
Before the call:
[mySection]
myKey="myValue"
After calling gINIFile.Item("mySection").Remove("myKey"):
[mySection]
myKey
Expected behavior is for myKey to be completely removed.
The text was updated successfully, but these errors were encountered: