Exemple #1
0
        /// <summary>
        /// 读出INI文件
        /// </summary>
        /// <param name="Section">项目名称(如 [TypeName] )</param>
        /// <param name="Key">键</param>
        public string ReadIni(string filePath, string Section, string Key)
        {
            StringBuilder temp = new StringBuilder(500);
            int           i    = SaveStatic.GetPrivateProfileString(Section, Key, "", temp, 500, filePath);

            return(temp.ToString());
        }
Exemple #2
0
 /// <summary>
 /// 写入INI文件
 /// </summary>
 ///  <param name="filePath">ini文件路径</param>
 /// <param name="Section">项目名称(如 [TypeName] )</param>
 /// <param name="Key">键</param>
 /// <param name="Value">值</param>
 public void SaveIni(string filePath, string Section, string Key, string Value)
 {
     SaveStatic.WritePrivateProfileString(Section, Key, Value, filePath);
 }