Jump to content
Xtreme .Net Talk

Setting Files, Resources files, xml files which is the best to read/write values


Recommended Posts

Posted

Hi,

 

Please someone help me about Resources, Settings and XML.

The point is how should I read/write a configuration file quickly and easily?

I currrently used, DataSet.ReadXml(<path>) and i get/set the values i need, but this is not very heavy and memory consumer?

Settings files, are great, easy to use by name, etc... but i'm having serious problems in writting values there, i load my form, i read the values and when i close it, i wannted to save the current values to settings file, but the values aren't assumed correctly.

I saw a lot of examples using XMLReader and iterate through the nodes to get/set the values.

 

I hope someone can help me about good programming in read/write configuration files, for my exe, or for my dlls.

 

Thanks in advance,

Tiago Teixeira

Posted
The way I generally do it is as you say with the XmlTextReader and the XmlTextWriter classes. Another way of doing it is to create a Settings class and to serialize it using xml serialization.
Anybody looking for a graduate programmer (Midlands, England)?
Posted

Thanks.

I can perfectly read/write values by someways, but i would like to have an opinion of other to see wich is the most common way.

 

Regards

Tiago Teixeira

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...