INIFile Class ?

G

genc ymeri

Is there any kind of INIFile class in .NET library ? something similiar
with TIniFile in Delphi ?

If not what is the best way to read configuration data from a INI file in C#
?
 
N

Nicholas Paldino [.NET/C# MVP]

Genc,

There is nothing in the framework that handles INI files. However, you
can call the GetPrivateProfile* APIs through the P/Invoke layer, and create
a class that will do it rather easily.

Hope this helps.
 
G

genc ymeri

Nicholas,
Just to get an idea, how come the .NET framework do not have anythin for INI
files handeling ? Is there any replacement for it ?

Thanks.

Nicholas Paldino said:
Genc,

There is nothing in the framework that handles INI files. However, you
can call the GetPrivateProfile* APIs through the P/Invoke layer, and create
a class that will do it rather easily.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Is there any kind of INIFile class in .NET library ? something similiar
with TIniFile in Delphi ?

If not what is the best way to read configuration data from a INI file
in
 
N

Nicholas Paldino [.NET/C# MVP]

genc,

Well, initially there were INI files, then the registry was the
suggested way of doing things. Now, the push is for XML everywhere, and
while they won't say it outright, using XML for your configuration files is
generally a good idea (easily updatable, easily parsable by the classes in
the System.Xml namespace, etc, etc).


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Nicholas,
Just to get an idea, how come the .NET framework do not have anythin for INI
files handeling ? Is there any replacement for it ?

Thanks.

message news:[email protected]...
Genc,

There is nothing in the framework that handles INI files. However, you
can call the GetPrivateProfile* APIs through the P/Invoke layer, and create
a class that will do it rather easily.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Is there any kind of INIFile class in .NET library ? something similiar
with TIniFile in Delphi ?

If not what is the best way to read configuration data from a INI file
in
 
G

genc ymeri

Thanks a lot. :) :) :)

Nicholas Paldino said:
genc,

Well, initially there were INI files, then the registry was the
suggested way of doing things. Now, the push is for XML everywhere, and
while they won't say it outright, using XML for your configuration files is
generally a good idea (easily updatable, easily parsable by the classes in
the System.Xml namespace, etc, etc).


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Nicholas,
Just to get an idea, how come the .NET framework do not have anythin for INI
files handeling ? Is there any replacement for it ?

Thanks.

message news:[email protected]...
Genc,

There is nothing in the framework that handles INI files.
However,
you
can call the GetPrivateProfile* APIs through the P/Invoke layer, and create
a class that will do it rather easily.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Is there any kind of INIFile class in .NET library ? something similiar
with TIniFile in Delphi ?

If not what is the best way to read configuration data from a INI
file
in
 

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