How to read the INI file in C #

xiaoxiao2021-03-06  63

A piece of code to read and write in the INI file in C #, in fact, this article only points out one direction, I hope everyone can touch bypass.

// write INI file [DllImport ( "kernel32")] private static extern bool WritePrivateProfileString (string section, string key, string val, string filePath); // read 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 (digital [DllImport ( "kernel32")] private static extern int GetPrivateProfileInt of (string section, string key, INT DEF, STRING FILEPATH; // Using System; Using System.io; Using System.Runtime.InteropServices; Using System.Text; Namespace Echoncomponentlibrary {///

/// INIFILE Summary Description. /// < / summary> public class inifile {private string ffilename; [DLLIMPORT ("kernel32")]

转载请注明原文地址:https://www.9cbs.com/read-118843.html

New Post(0)