martin05
asked on
Read INI file
Can someone tell me how to read an in file that has multiple values in each section from within a windows application ?
e.g
[Servers]
ServerName 1=Server1
ServerName 2=Server2
ServerName 3=Server3
e.g
[Servers]
ServerName 1=Server1
ServerName 2=Server2
ServerName 3=Server3
ASKER
rawinnlnx9 thanks for the reply thats fine I can read the ini file for a single value, but how do you do it for multiple values ?
INIFile ini = new INIFile("C:\\config.ini");
for (int i = 0; i < ??????????; i++)
{
ini.Read ??("Server 1,???????????")
}
INIFile ini = new INIFile("C:\\config.ini");
for (int i = 0; i < ??????????; i++)
{
ini.Read ??("Server 1,???????????")
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got 2 different solutions to my problem .
Both will work so splitting the points
Thanks for your help guys
Both will work so splitting the points
Thanks for your help guys
That's the ticket.