using System;
using System.IO; 
using System.Runtime.InteropServices;  
using System.Text; namespace MyClock
{
/// <summary>
/// Ini 的摘要说明。
/// </summary>
public class Ini
{ public string path;     //INI文件名  


public Ini(string INIPath)
{
//
// TODO: 在此处添加构造函数逻辑
            //
path = INIPath;  }
[DllImport("kernel32")]   private static extern long WritePrivateProfileString(string   
section,string key,string val,string filePath);   [DllImport("kernel32")]   private static extern int GetPrivateProfileString(string section,string key, string def,StringBuilder retVal,int size,string filePath);   //声明读写INI文件的API函数       
public void IniWriteValue(string Section,string Key,string Value)   {   WritePrivateProfileString(Section,Key,Value,this.path);   }   //写INI文件            public string IniReadValue(string Section,string Key)   {   StringBuilder temp = new StringBuilder(255);   int i = GetPrivateProfileString(Section,Key,"",temp,255,this.path);   return temp.ToString();   }   //读取INI文件指定  
}
}

解决方案 »

  1.   

    string path = Application.StartupPath ;Ini ini = new Ini(path+"\\Set.ini"); ini.IniWriteValue ("Main","Form String","Something");存储当前目录下的ini文件,如没有则创建!
      

  2.   

    http://www.zdnet.com.cn/developer/code/story/0,2000081534,39065664-2,00.htm
    http://developer.ccidnet.com/pub/disp/Article?columnID=294&articleID=26002&pageNO=1
    希望对你有所帮助
      

  3.   

    这么复杂啊,看不懂啊。是创建schema.ini.导入TXT文本所需要生成的文件。