正在阅读:教你在C#中如何读写INI文件教你在C#中如何读写INI文件

2004-09-08 10:18 出处:CSDN 作者:abaowu 责任编辑:linjixiong


  {
  StringBuilder temp = new StringBuilder(1024);
  GetPrivateProfileString(section,key,def,temp,1024,FFileName);
  return temp.ToString();
  }
  public void WriteInt(string section,string key,int iVal)
  {
  WritePrivateProfileString(section,key,iVal.ToString(),FFileName);
  }
  public void WriteString(string section,string key,string strVal)
  {
  WritePrivateProfileString(section,key,strVal,FFileName);
  }
  public void DelKey(string section,string key)
  {
  WritePrivateProfileString(section,key,null,FFileName);
  }
  public void DelSection(string section)
  {
  WritePrivateProfileString(section,null,null,FFileName);
  }

  }
  }


 


察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:
键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品