English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

http://www.codeproject.com/csharp/cs_ini.asp

2007-01-16 04:09:41 · answer #1 · answered by Anonymous · 0 0

this can be solved extremely somewhat once you get used to the fopen function. fopen is a function in stdio.h and it takes 2 arguments: - the route of the record that you want to open - the mode you want to get entry to the record in(for that reason you'll use r surrounded by technique of rates) fopen will go back a NULL value if there became an blunders, for that reason if the record would not exist. fopen does set the errno value so so that you may use that to distiguish what the concern became yet it truly is ussually utilized in additional effective stepped forward courses so your code will appear as if this major(int argc,char * argv[]) { record *fp = fopen(argv[a million],'r');/*if this spits an blunders reproduction argv[a million] right into a char array then use that because the parameter*/ if(*fp = NULL) printf("The record does no longer exist."); /*end something else of this technique the following*/ }

2016-10-15 07:35:36 · answer #2 · answered by Anonymous · 0 0

Asl again what you would like to know specifically, as there is no source code to read or write an ini file...

2007-01-16 03:57:18 · answer #3 · answered by DarkWolf_1st 4 · 1 1

It's really simple, use the TextReader class to read each line, ignore lines that start with '#' or whatever the comment character is. Then do a split on each line by '=' to get name value pairs. Reading string values is easy, to read int or float use Int32.Parse() and Single.Parse(), etc....

2007-01-16 04:08:56 · answer #4 · answered by Pfo 7 · 0 0

fedest.com, questions and answers