473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

read-write ini file

Hy all

In c# how can I read/write ini file? I need this for back compatibility. Is
possible little example?

For future, what is the best practice to replace ini file? app.config? xml
files??

TIA,
Paul
Nov 16 '05 #1
2 14214
Hello Paul,
You may use full Win32 interoperability in .Net, and make a declaration of
..Net style, then use the API function "GetPrivateProfileString".

"Paul M" <m2*****@yahoo.com> дÈëÏûÏ¢ÐÂÎÅ
:Ow**************@TK2MSFTNGP10.phx.gbl...
Hy all

In c# how can I read/write ini file? I need this for back compatibility. Is possible little example?

For future, what is the best practice to replace ini file? app.config? xml
files??

TIA,
Paul

Nov 16 '05 #2
On Wed, 22 Dec 2004 12:40:22 +0200, "Paul M" <m2*****@yahoo.com>
wrote:

In c# how can I read/write ini file? I need this for back compatibility. Is
possible little example?

Try http://www.codeproject.com/csharp/ini.asp
comes with full source code and example

Cheers,

Chris
Nov 16 '05 #3

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

Similar topics

11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
4
by: Andreas Müller | last post by:
Hi, I'm working on a Linux-programm with a signal-handler and therfore I need to use the read-system-call instead of cin.get or sth. like that. With getline my program works fine, it reads a...
4
by: Ollie Cook | last post by:
Hi, I am having some difficulty with read(2) and interrupting signals. I expect I am misunderstanding how the two work together, so would appreciate some guidance. I am trying to 'time out' a...
7
by: Mike | last post by:
Hi, I have an iteration to retrieve a number of messages from a server. Within this iteration, I am using the following code: do { readBytes = base.GetStream().Read(received, 0,...
3
by: Ole | last post by:
I got a problem with serial port read which I use like this: sp.Read (byteBuffer, 0, 100); but the problem is that it returns before it has read the 100 bytes - is there a way to set up the...
5
by: troy | last post by:
Could someone please point me in the right direction on how to read in a large query with .net. I am trying to emulate a legacy database system so I don't know the upper bounds of the sql query....
7
by: Igor | last post by:
1. In this topic...
3
by: Osamede.Zhang | last post by:
I have some code like this: SqlCommand cmd = new SqlCommand("get_storeid_byuser", cn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@username", SqlDbType.VarChar, 50).Value...
4
by: Jim | last post by:
I have the following piece of code: Directory.CreateDirectory(myDir); DirectoryInfo lDir = new DirectoryInfo(myDir); lDir.Attributes = FileAttributes.Normal; When this code runs, my directory...
3
by: Rahul Babbar | last post by:
Hi, I had the following doubts about the "For Read Only" clause. 1. How does a "for Read only" clause improve the performance? 2. How does a "for Read only" clause compare with "With UR"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.