I
I
Ivan Vyrov2014-11-01 05:02:18
C++ / C#
Ivan Vyrov, 2014-11-01 05:02:18

Working with ini files?

Good morning!
Tell me how to work with inin files in C #, you need to read the information from the file.
You can post a link to the source.
[DB]
host=localhost
port=14358

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Taratin, 2014-11-01
@ProKiLL

https://code.google.com/p/ini-parser/
www.codeproject.com/Articles/1966/An-INI-file-hand...
bytes.com/topic/net/insights/797169-reading- parsin...

A
Andrey Plax, 2014-11-01
@Hereigo

I won’t tell you how to correctly, I myself used to read line by line and then String.Split("="). But if you do it right, then it's better to use XML or application.settings.

S
Sumor, 2014-11-01
@Sumor

If only Windows, then there is a winapi function GetPrivateProfileString , which is just for this purpose.
Usage example in c# GetPrivateProfileString

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question