Yes, you are missing something! :) Try
System.Xml.XmlSerializer, you don't even have to manually
read the data yourself. You can create a config class
with the data you need to store as public variables or
public properties. Then simply call .Serialize and it'll
save all your data to an XML file of your choice. That's
it! Want to deserialize? Call .Deserialize, passing the
XML file, it'll create an instance of your config class
with all the data that was in the XML file. It's that
simple.
[quoted text, click to view] >-----Original Message-----
>I can't believe that Dot.Net has no easy to use INI file
replacement.
>
>In Delphi you set up a class to read/write data from by
using this
>statement.
>
> theINI := TIniFile.Create(filename);
>
>To read from it you do something like:
>
> frmMain.top := theINI.ReadInteger('INIT','Top',50);
> frmMain.left := theINI.ReadInteger
('INIT','Left',50);
>
>and to write:
>
> theINI.WriteInteger('INIT','Top',frmMain.Top);
> theINI.WriteInteger('INIT','Left',frmMain.Left);
>
>Pretty simple huh?
>
>Am I missing something?
>
>
>.
I can't believe that Dot.Net has no easy to use INI file replacement.
In Delphi you set up a class to read/write data from by using this
statement.
theINI := TIniFile.Create(filename);
To read from it you do something like:
frmMain.top := theINI.ReadInteger('INIT','Top',50);
frmMain.left := theINI.ReadInteger('INIT','Left',50);
and to write:
theINI.WriteInteger('INIT','Top',frmMain.Top);
theINI.WriteInteger('INIT','Left',frmMain.Left);
Pretty simple huh?
Am I missing something?