最近项目用到ini文件,读取ini文件,方法如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections.Specialized; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; namespace test{ /
在开源中国看到的操作ini文件的,写的还不看,留着以后用 using System; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Collections; using System.Collections.Specialized; namespace wuyisky{ /**//**/ /**//// <summary> /// IniFiles的类 /// <
在上篇文章开发 windows mobile 上的今日插件时,我发现 wince 平台上不支持例如 GetPrivateProfileString 等相关 API 函数.在网络上我并没有找到令我满意的相应代码,因此我手工自己写了相应的方法.命名规则是,在 PC API 函数的名称前面加上 “Ce” 前缀,这是为了在 PC 平台上调试和使用时,不和系统的 API 函数发生冲突.值得注意的是,在写 CeWritePrivateProfileString 方法时,如果改写后的 ini 文件应该比改写前