473,473 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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.
--
Thanks.
Mar 2 '08 #1
2 6572
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.

"Pucca" <Pu***@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.com...
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.
--
Thanks.

Mar 2 '08 #2
Thank you.
--
Thanks.
"Fredo" wrote:
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.

"Pucca" <Pu***@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.com...
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.
--
Thanks.


Mar 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sean | last post by:
hi, I have been trying to solve this problem since morning, and haven't really come up with a solution. it is frustrating. please help. i have a datagrid and got a delete column ...
6
by: I am Sam | last post by:
I keep getting this error and I don't know why: The path is too long after being fully qualified. Make sure path is less than 260 characters. Description: An unhandled exception occurred...
3
by: kathleen | last post by:
Hi there, I'm new to this forum & to programming in general, and am really stuck with a piece of buggy code. Can anyone help? I have several problems which may or may not be related. I have...
11
by: comp.lang.php | last post by:
Once again, I thought my class method deleteZip() would do the trick, but it never deletes any .zip* file found in a directory: /** * Delete any latent ZIP files found in this album. This...
0
by: george | last post by:
Hi all - I am trying to use ASP.NET 2.0 to delete a row in an Oracle database table GC_LOG (see following, note that my connection string is fine, everything else like updateCommand is...
5
by: Bob Bridges | last post by:
Start with two tables, parent records in one and child records in the other, a one-to-many relationship. Create a select statement joining the two. Display the query in datasheet mode. When I...
6
by: Annalyzer | last post by:
My database must produces a .csv file with a header line that is different from the detail lines. This .csv file contains a monthly report to an outside agency and is uploaded online so it must...
6
by: Kindler Chase | last post by:
I'm trying to iterate through a set of nodes and then edit/delete specific attributes using XPathNodeIterator. Adding attributes is no problem. My first question is how do I delete an attribute...
8
by: chromis | last post by:
Hi, I'm writing a contacts section for a cms on a website, I've decided to write the section in OO code. So far I have my Contacts object and a page structure I would use for a procedural site. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.