Skip to content

Instantly share code, notes, and snippets.

@bonjin6770
Created February 9, 2017 00:15
Show Gist options
  • Save bonjin6770/11650c949d5ac20144ac16720c0e622c to your computer and use it in GitHub Desktop.
Save bonjin6770/11650c949d5ac20144ac16720c0e622c to your computer and use it in GitHub Desktop.
read ini file with Ini-Parser
using IniParser;
using IniParser.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ReadIniFileKey
{
class Program
{
static void Main(string[] args)
{
FileIniDataParser fileIniData = new FileIniDataParser();
IniData parsedData = fileIniData.ReadFile("TestIniFile.ini");
var sections = parsedData.Sections;
foreach (var section in sections)
{
foreach (var key in section.Keys)
{
Console.WriteLine(key.KeyName);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment