最近项目用到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文件代码 public class INIHelper { public string inipath; [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); [DllImport("kernel32")] private stati
bat 读取 ini 文件 参考链接:https://stackoverflow.com/questions/2866117/windows-batch-script-to-read-an-ini-file 这个 bat 支持 ini 的键值与=号之间存在空格,例如 key1 = value1 readini.bat: @if (@a==@b) @end /* -- batch / JScript hybrid line to begin JScript comment :: ---------
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace 读写ini文件 { public class Ini { // 声明INI文件的写操作函数 WritePrivateProfileString() [System.Runtime.InteropServices.DllImport("kern
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace 读写ini{public class Ini{// 声明INI文件的写操作函数 WritePrivateProfileString()[System.Runtime.InteropServices.DllImport("kernel32")]private static e
//INIClass读取类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.IO; using UnityEngine; namespace cReadConfigFile { public class INIClass { public