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

  • Thread starter Thread starter Pucca
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top