![]() ![]() Public void DeleteKey(string Key, string Section = null) WritePrivateProfileString(Section ? EXE, Key, Value, Path) Public void Write(string Key, string Value, string Section = null) GetPrivateProfileString(Section ? EXE, Key, "", RetVal, 255, Path) Public string Read(string Key, string Section = null) Path = new FileInfo(IniPath ? EXE + ".ini").FullName.ToString() Static extern int GetPrivateProfileString(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath) Static extern long WritePrivateProfileString(string Section, string Key, string Value, string FilePath) String EXE = Assembly.GetExecutingAssembly().GetName().Name Change this to match your program's normal namespace La pequeña claseĪgregue una nueva clase llamada IniFile.cs a su proyecto: using System.IO Usted es libre de usarlo comercialmente sin atribución. Por la presente, lo libero al dominio público. NET instalado (es decir, Windows 98 - Windows 10). Si se adapta a sus necesidades, siga leyendo.Įsta es una implementación concisa que escribí, utilizando la versión original de Windows P / Invoke, por lo que es compatible con todas las versiones de Windows con. En primer lugar, lea esta publicación del blog de MSDN sobre las limitaciones de los archivos INI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |