Is it possible for a program to make new settings?
To enter the settings name, type, scope, value?
If yes how?
If no what would you advice me to do instead?
Thanks
Printable View
Is it possible for a program to make new settings?
To enter the settings name, type, scope, value?
If yes how?
If no what would you advice me to do instead?
Thanks
What are you trying to accomplish by doing so? I think that would be a better question to ask.
Im making a web browser bot and by this im trying to allow the user to save lots of settings... So i would need a way to store them.
I dont want to pre-make the settings
Thanks
How do you usually save data from a program after it's been deployed? In a file or a database. My first choice would probably be an XML file, but it's completely up to you what format you use.
try using app.configs or my.settings
Im a newbie so i dont know what i should do and how i should do it. Could someone tell me how i should do it and kick me in the right dirrection? or at tell me what i should google.
Or not. My.Settings requires you to create the settings before deployment and the question was specifically about creating them after deployment. You could edit the config file but that would be a bad idea. Editing values in the config file programmatically is one thing but editing the schema is quite another. It's a far better option to create your own XML file, which you can read and write at startup and shutdown. You can define an element with a name and a value and add as many as you like. You could even use serialization, which would simplify the reading and writing code. You'd define a class that corresponded to that element and serialize a list of instances. You might want to add a data type too.
ok going to use that and do you know any tutorial at which i should have a look?
someone?
Please be sure to check out "Do not open what ever you do" in my signature.Quote:
someone?
If you decide to use an xml file, then check out the System.Xml Namespace. In the classes they have XML Textreader as well as XML writer. At the bottom of just about every class/method/ect. on msdn's library you'll find some wonderfull examples.