janerist / inifile Goto Github PK
View Code? Open in Web Editor NEWRead and write INI files
Read and write INI files
string filename = "C:\\Users\\username\\AppData\\Local\\TslGame\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
var iniFile = new IniFile.IniFile(filename);
iniFile.Save(filename);
#pubg game GameUserSettings.ini
[/Script/TslGame.TslGameUserSettings]
ScreenScale=100.000000
...
ErangelPreloadingMaps=Grid-Level_1-1
ErangelPreloadingMaps=Grid-Level_1-2
ErangelPreloadingMaps=Grid-Level_1-5
ErangelPreloadingMaps=Grid-Level_1-6
ErangelPreloadingMaps=Grid-Level_2-2
ErangelPreloadingMaps=Grid-Level_2-3
ErangelPreloadingMaps=Grid-Level_3-1
ErangelPreloadingMaps=Grid-Level_3-2
ErangelPreloadingMaps=Grid-Level_3-3
ErangelPreloadingMaps=Grid-Level_3-4
ErangelPreloadingMaps=Grid-Level_4-2
ErangelPreloadingMaps=Grid-Level_4-3
ErangelPreloadingMaps=Grid-Level_4-6
ErangelPreloadingMaps=Grid-Level_5-1
ErangelPreloadingMaps=Grid-Level_5-2
ErangelPreloadingMaps=Grid-Level_5-4
ErangelPreloadingMaps=Grid-Level_5-5
ErangelPreloadingMaps=Grid-Level_5-6
ErangelPreloadingMaps=Grid-Level_6-1
ErangelPreloadingMaps=Grid-Level_6-2
ErangelPreloadingMaps=Grid-Level_6-3
ErangelPreloadingMaps=Grid-Level_6-4
ErangelPreloadingMaps=Grid-Level_6-5
ErangelPreloadingMaps=Grid-Level_6-6
"Param=1" and "param=1" is different names in this realisation.
From other side in Delphi TIniFile , for example "Param=1" and "param=1" is equivalent.
when i use Get to "Param=1" i expect get "true"
and i use Get to "Param=0" i expect get "false"
but i got error
There is code to fix this bug
` public T Get(string name, T defvalue)
{
if (_properties.ContainsKey(name))
if (typeof(T) == typeof(bool))
if (Convert.ToInt32(_properties[name].Value)==0) return (T)Convert.ChangeType(false, typeof(T));
else return (T)Convert.ChangeType(true, typeof(T));
else return (T)Convert.ChangeType(_properties[name].Value, typeof(T));
return defvalue;//default(T);
}`
And also i add code to more comfortable use
Such as Param1 = IniFile.Get("Section1", "Param1", true);
public T Get<T>(string section, string name, T defvalue) { return Section(section).Get<T>(name,defvalue); }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.