-
Let's give you a method.,This method is set up.,You can change it to read.,If you can read the configuration, it's no problem, right?
Configure the key. Configure the value.
public static void setappconfig(string strkey, string strvalue)
string filepath = "/config/");
xmldocument xmldoc = new xmldocument();
xmlnode xmlnode = "/appsettings/add[@key='" + strkey + "']");
xmlelement element = xmlnode as xmlelement;
value"].value = strvalue;;
-
If you use a strongly typed settings class, for example, if my project is called WindowsFormsApplication3, you need to import the following namespace.
using ;
settings settings = new settings();
listlst = new list();It can be changed to dictionary
Add the path item in usersettings to the collection.
Add the values of the other settings to the collection here.
Ask me a question.
-
Use. if ("invariantinfo"] != "false")
It's absolutely no problem.,I've taken it n times.,No, you delete your config file.,Add a file to vs and copy the content.。
I'm using VS, compiling with csc may be missing parameters for you.
-
#include
include "Jane Roll".
#define max_buf 2048
#define server "authserver "Rent.
#define config_file ""
bool setauthserver(char* strserveradd)
char buf[max_buf], writebuf[max_buf];
memset(buf, 0, max_buf);
memset(writebuf, 0, max_buf);
file *pf = fopen(config_file, "r");
if(!pf)
printf("Failure to open the file is missing! ");
return false;
fread(buf, max_buf, 1, pf);
char *lppos = null;
while(fgets(buf, max buf, pf)) reads a row.
if(lppos = strstr(buf, server))
strncpy(writebuf+strlen(writebuf), buf, lppos+strlen(server)-buf);
strcat(writebuf, strserveradd);
strcat(writebuf, "r");
else strcat(writebuf, buf);
if(feof(pf)) break;
fclose(pf);
pf = fopen(config_file, "w");
if(!pf)
printf("Failed to open the file! ");
return false;
fwrite(writebuf, strlen(writebuf), 1, pf);
fclose(pf);
return true;
-
I'd like to ask you what your char *buf does. , save the read string with ?
But you are asking for conversion to the base system below, that is to say, these data are digital orange eggplant nature circle scattering, that should be stored with int ?
In addition, the data you want to save is len line, right, then it should be int **.
To elaborate on my doubts, now that you can read the data, it depends on what you want to do with the data.
There is also the final conversion, whether you want to save it in 10 base, or just need to output it to the screen or file in 10 base.
Whether it is a string or an int output should be clarified.
-
Because most players may encounter this situation after the game version of QQ Farm is updated, there are three solutions: 1**Latest Flash Player plugin 2
Clear your browser's cache 3Restore browser defaults How do I clear cache files? 1.
Start by opening the Internet Explorer, click on "Tools" in the menu bar above, and then click on "Internet Options" 2Click on "Delete Files" in the pop-up window 3In the next window, tick "Delete all offline content" and then click OK.
4.After completing the above steps, close the Internet Explorer browser and reopen it. Note:
After clearing the cache, be sure to close the browser and then reopen the browser to log in to the game in order to completely empty the cache and enter the game normally! If that still doesn't work, try the following: 1
Open IE browser, click "Tools" in the menu bar above, then click "Internet Options", click "Advanced", and then restore the default settings, OK. 2.Tap Start-Run Enter regsvr32 and select OK, then enter regsvr32 again and select OK.
-
Clear the cache of your browser (Tools - > Interner Options - > delete cookies), then click Tools on your browser - select the Internet option at the bottom, then click Internet to delete files (remember to check the delete all offline content), and then reopen the farm I encountered the same situation as you, and this is how it was solved, I hope it can help you.
Thank you for the trouble to adopt!
-
There's no hassle to play here.
And it's very cute.
Very filial piety and more mm porridge.
The drop-down box contains multiple items, and the text that can read one of the items in the drop-down box (n represents the index). >>>More
A complete program consists of three parts: program number, program content, and program end. >>>More
textreader reader;
int linecount = 0; >>>More
In fact, you don't need to make optical discs, now the hard disk is very large, you can directly use one-click recovery software to back up the C disk to your hard disk, which is faster than the optical disc, and you are not afraid of problems like disc wear and tear (you can't read it, of course you can't use it)! >>>More