Skip to content
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

Add a section to IniData.Section produce errors. #83

Closed
tokkenno opened this issue Jun 10, 2015 · 1 comment
Closed

Add a section to IniData.Section produce errors. #83

tokkenno opened this issue Jun 10, 2015 · 1 comment
Labels

Comments

@tokkenno
Copy link

(Sorry for bad English)

When a section is added to an IniData object with .Sections.Add(), some inconsistencies and errors occur.

Example:

IniData idata = new IniData();

SectionData exampleSection = new SectionData("examplesection");
exampleSection.Keys.AddKey("examplekey");
exampleSection.Keys["examplekey"] = "examplevalue";

idata.Sections.Add(exampleSection);

parser.WriteFile(path, idata);

This code produces the file:

[]
examplekey = examplevalue

in place of

[examplesection]
examplekey = examplevalue
@rickyah
Copy link
Owner

rickyah commented Jun 13, 2015

I'll take a look at it, thanks!

@rickyah rickyah added the bug label Jun 13, 2015
rickyah added a commit that referenced this issue Jun 13, 2015
rickyah added a commit that referenced this issue Jun 13, 2015
* development:
  Bump version to 2.2.2
  Cleaned up docs
  Marked AddKey(string, KeyData) method obsolete; use AddKey(KeyData)
  Add tests to prevent similar bugs as found in #83 when adding keys
  Fixes #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants