ini文件删除指定SECTION下的内容,但是section还在
如题。
INI文件的API函数,大多是读写值的,不知道有没有办法,清空某个Section下面的所有KEY和VALUE值。
例如 存在文件:File1.INI
里面包含如下内容:
[Section1]
Key1=Value1
Key2=Value2
[Section2]
Key3=Value3
Key4=Value4
求一个函数Function ClearSection(FileName as string,SectionName as string)
调用ClearSection(File1.INI,Section1)后,文件内容变成
[Section1]
[Section2]
Key3=Value3
Key4=Value4
请给出参考代码,谢谢