Clean up ini file automatically

I have some manual code that cleans up a corrupt ini file, for instance removes duplicate sections and keys. I don't like using that custom code, would like to use a standard library instead. Have been looking at https://github.com/rickyah/ini-parser, but it seems to not have any automatic way of cleaning this up. If it encounters an invalid ini file with duplicate sections and keys, it throws an error.

Does anyone here know of a library out there that I can use in .Net C# that automatically fixes the problems described above?
LVL 2
itniflAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
There is no way to do this automatically. Cause the content of a ini-file and whether it is valid depends on the application. A tool cannot know this. Especially as there is not a real grammar for ini-files. Further more, duplicate sections or keys can be valid..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itniflAuthor Commented:
Thank you. I found an acceptable solution with self-written code instead.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.