In C #, I read and write a piece of code from the INI file. In fact, this article only points out a direction and hopes that you can bypass the class.
The full text of the Code is as follows:
// Write the INI File
[DllImport ("kernel32")]
Private static extern bool WritePrivateProfileString (string section, string key, string val, string filePath );
// Read the INI file (character
[DllImport ("kernel32")]
Private static extern int GetPrivateProfileString (string section, string key, string def, StringBuilder retVal, int size, string filePath );
// Read the INI file (number
[DllImport ("kernel32")]
Private static extern int GetPrivateProfileInt (string section, string key, int def, string filePath );
//////////////////////////////////////// //////////////////////
Using System;
Using System. IO;
Using System. Runtime. InteropServices;
Using System. Text;
Namespace EchonComponentLibrary
{
///
/// Summary of IniFile.
///
Public class IniFile
{
Private string FFileName;
[DllImport ("kernel32")]