ini文件的格式是这样的。[App1]
path='...'
time='...'[App2]
path='...'
time='...'...
如何通过循环的方式读取App1、App2、...的Time值?在不清楚App1、App2、的值的情况下。就是说不用readString('App1','Time','');这样的方法来读取Time值。
path='...'
time='...'[App2]
path='...'
time='...'...
如何通过循环的方式读取App1、App2、...的Time值?在不清楚App1、App2、的值的情况下。就是说不用readString('App1','Time','');这样的方法来读取Time值。
apps,times:TStrings;
AppIni:tinifile;
i:integer;
begin
AppIni := TIniFile.Create('date.ini');\\路径
times:=tstringlist.Create;
apps:=tstringlist.Create;
AppIni.ReadSections(apps);
AppIni.ReadSections(times);
for i:=0 to apps.Count-1 do
begin
times[i]:=appini.readString(Apps[i],'Time','');
end;
end;
没看见上面给你的代码?