using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace DAL
{
public class Ini
{
// 声明INI文件的写操作函数 WritePrivateProfileString()
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
// 声明INI文件的读操作函数 GetPrivateProfileString()
[DllImport("kernel32", EntryPoint = "GetPrivateProfileString")]
private static extern long GetPrivateProfileString(string section, string key,
string def, StringBuilder retVal, int size, string filePath);
[DllImport("kernel32", EntryPoint = "GetPrivateProfileString")]
private static extern uint GetPrivateProfileStringA(string section, string key,
string def, Byte[] retVal, int size, string filePath);
private string sPath
c#中有关config.ini配置文件的增删改查
最新推荐文章于 2023-03-29 19:35:33 发布