How to delete an ini file's section and its data in C#?

P

Pucca

Hi, I'm using vs2005 and .net 2.0 for a windows C# applicaiton. How can I
delete an ini file's section and its data in C#? Is there a .net funciton I
can call? Also, Is there a way to find out how many key & value entry under
a section in a ini file? Thank you.
 
F

Fredo

I don't believe .NET has built-in code for dealing with ini files. You can
p/Invoke into the Windows API to deal with .INI files or you can write your
own (and I know there are libraries out there for .NET for doing it. Just
google "C# ini library" or something like that).

The .INI is about the most trivial file format out there, though. It
wouldn't be that hard to do everything you're talking about in your own
code.
 
P

Pucca

Thank you.
--
Thanks.


Fredo said:
I don't believe .NET has built-in code for dealing with ini files. You can
p/Invoke into the Windows API to deal with .INI files or you can write your
own (and I know there are libraries out there for .NET for doing it. Just
google "C# ini library" or something like that).

The .INI is about the most trivial file format out there, though. It
wouldn't be that hard to do everything you're talking about in your own
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top