Greetings Guys,
I was bored so I made a dll to read your Ini files.
all you need is to add the dll as a reference to your project and start using it.
an example:
test.ini
output:
Features:
-Managed (no native calls);
-You can comment your fields.
-Works on anyCPU maybe any platform :P.
-Reads Multiple sections.
okey test it , and if there is any issue please let me know so I can fix it.
I was bored so I made a dll to read your Ini files.
all you need is to add the dll as a reference to your project and start using it.
an example:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IniFile;
namespace Test {
internal class Program {
private static void Main(string[] args) {
var ini = new CIniFile("test.ini", "AccountServer");
int port = ini.GetInt("ACCOUNT_SERVER_PORT");
ini.SetSection("Game_DataBase");
string test = ini.GetString("DATABASE_HOST");
Console.WriteLine("values are {0} , {1}", port, test);
Console.ReadKey();
}
}
}
Code:
[AccountServer] ACCOUNT_SERVER_IP=5.230.189.19 ACCOUNT_SERVER_PORT=9958 [Account_DataBase] DATABASE_HOST=127.0.0.1 DATABASE_USER=root DATABASE_PASSWORD= DATABASE_DBNAME=account_zf DATABASE_PORT=3306 [GameServer] GAME_SERVER_NAME=Unkown GAME_SERVER_IP=5.230.189.19 GAME_SERVER_PORT=5816 [Game_DataBase] DATABASE_HOST=127.0.0.1 // this is the db ip DATABASE_USER=root DATABASE_PASSWORD= DATABASE_DBNAME=account_zf DATABASE_PORT=3306
Code:
values are 9958 , 127.0.0.1
-Managed (no native calls);
-You can comment your fields.
-Works on anyCPU maybe any platform :P.
-Reads Multiple sections.
okey test it , and if there is any issue please let me know so I can fix it.