Possible Duplicate:
Reading/writing INI file in C#
I have a textfile to store certain data for my parser. The data stored looks something like this:
[Yandex]
Hostname=http://yandex.ru
Query=yandsearch?text=[QUERY]&lr=213
LinksMask=<a class="b-serp-item__title-link" tabindex="2"[...]href="[LINK]" onmousedown=
TotalPages=100
NextPage=<a id="next_page" class="b-pager__next" href="[LINK]" onmousedown
NextPage2=<a id="next_page" class="b-pager__next" href="[LINK]" onmousedown
CaptchaURL=showcaptcha?retpath
CaptchaImage=captchaimg?
CaptchaField=rep
[Google Classic]
Hostname=http://[GOOGLEHOST]
Query=search?as_q=[QUERY]&num=100&hl=en&output=ie&filter=0
LinksMask=<li class="g"><h3 class="r"><a[...]href="[LINK]"
TotalPages=10
NextPage=<td class="b" style="text-align:left"><a href="[LINK]"
NextPage2=</font></a></td><td><a href="[LINK]"
CaptchaURL=
CaptchaImage=
CaptchaField=
I want to parse out the data under each [XXXX] and save the Hostname=, Query=, etc into strings..
What would the easiest way be to accomplish this?
Not looking to store the data in another way than textfile, i want it to be very easy to change for the user :)