Comments (3)
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.
from peanutbutter.
@ixm7 are you sure you have the correct project here? There's no Item
method on IINIFile - the code above doesn't seem to be against PeanutButter's INIFile class?
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 true
when the key was found and removed, false if the key wasn't found.
Thanks for the report.
from peanutbutter.
Thanks!
from peanutbutter.
Related Issues (20)
- Adding some README and documentations to explain INI HOT 1
- Servicepath can not be set // any documentation? HOT 3
- Feature: maintain order of sections and settings within file
- Quotes HOT 2
- CORS policy HOT 3
- semi-colon ini text value causes truncation HOT 21
- IniFile should not use ordinal Dictionary HOT 4
- Per-project documentation
- Switch build, pack & push to use `dotnet` HOT 1
- Project restructuring to simplify dev, especially multi-platform dev
- semi-colon ini text value causes truncation (2022) HOT 9
- SetValue return value HOT 1
- How to set encoding? HOT 1
- PeanutButter.INI: CommentDelimiter not respected when saving HOT 2
- PeanutButter.INI exception HOT 6
- [PeanutButter.INI] How can I add an empty line at the last line? HOT 6
- PeanutButter.DuckTyping: Parameter count error when trying to invoke overloaded method HOT 7
- Update PeanutButter.EasyArgs to be AOT-friendly
- [PeanutButter.INI] - Not possible to persist ini file if there is a SectionSeparator and no section HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peanutbutter.