ini文件操作:
var
NetIni:TIniFile;
FileStr:TStringList;
begin
FileStr := TStringList.Create;
//FileStr.Add('update.ini');
NetIni:=TIniFile.Create('Update.ini');
NetIni.ReadSections(FileStr);
//NetIni.ReadSectionValues('File1',FileStr);
FileStr.SaveToFile('tt.ini');
===========================================
1、ReadSections(..)读取ini文件中的所有节点名
2、ReadSectionValues(section,strings)读取节点section的值
3、ReadSection(section,strings)读取ini文件中section中的键值
4、ReadString(section,iden,default)
博客主要介绍了ini文件的操作,包括创建TIniFile对象、读取ini文件中的所有节点名、读取节点的值、读取键值等操作,并给出了相应的代码示例,如使用ReadSections、ReadSectionValues等方法。
386





