473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Save and load user settings?

110 100+
I am writing a project that uses settings established by the user and I would like to make those settings saveable so the user doesn't have to enter them every time. There are several fields so I don't know how I would save those fields and load them again. I am thinking using streamwriter to output all the settings to a txt file then using streamreader and identifying each new line as a new variable to load back into the appropriate fields. This should work but seems like it might be a long answer to a question with a simpler answer. Can anyone suggest something more convenient then the write it out read it in that I mentioned?
Oct 31 '10 #1
4 3304
Bassem
344 100+
Fuzz13,
Use XML, and use LINQ to XML to manipulate the file. This would be the best way but according to your needs you should go.

Subin Ninan,
The link is broken. I think it is better to post the actual link, not the redirect one.
Nov 1 '10 #3
Fuzz13
110 100+
Bassem I am still pretty new to programming and I have not learned about XML and LINQ yet. Can you direct me to some good info about them? I assume they are not just methods and/or classes for use so they probably have tons of info to learn about?
Nov 1 '10 #4
Bassem
344 100+
hey probably have tons of info to learn about?
I pointed you to the simplest way to do your task. I think you would take less than 1 day to learn it and use it.

Here is a good start:
Introduction to LINQ - Simple XML Parsing
I just googled for 1 minute to get that link. You can find a lot of tutorials.
Nov 1 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Todd Beaulieu | last post by:
Hello, I'm using the configuration block to store user settings in the app.config file. As this exe will reside on a network drive, I can't have users trying to update the master app.config...
2
by: Nevyn Twyll | last post by:
I understand that I am not supposed to alter the .config file for a program (accessible through the AppSettings). Is there a System class you could recommend that I could use (or even a class...
10
by: Scuba Rob | last post by:
I am having problems on getting the radio button to work with my.settings correctly. I want the program to check to see which one was last saved to use at startup. The closest I have come is that I...
3
by: broli85 | last post by:
I am writing an extension for Firefox 1.5. I would like to know if there is a way to write and read data to and from a file which is in the location of the extension (or somewhere in the user's...
3
by: penguin732901 | last post by:
What do experienced programmers find the most efficient way to handle user settings. Currently I have 4 tables which allow various clients to customize my program to work for them,...
4
by: RedHair | last post by:
I developed a Win form with VS.NET 2005 + .NET 2.0 in C# There are some application settings are "User" scope and stored in xxx.settings, I can access them via Settings class and changethem with...
0
by: =?Utf-8?B?SmFuaQ==?= | last post by:
Hi parez, I agree with Jon, for this case are user settings the best solution. The article http://www.codeproject.com/KB/dotnet/user_settings.aspx describes the pros. Jani "parez" wrote:
1
by: =?Utf-8?B?VGVycnk=?= | last post by:
I am using the My.Settings object to save user settings. During testing, I want to 'zero' out what has been saved to start with the defaults again. Where doies the framwork actually persist these...
0
by: DIOS | last post by:
I am using the My.Settings class to save the state of user options in a tab control on the main form. One tab is for the main data elements and the other tab holds the user options which consist of...
2
by: Jeff Agee | last post by:
Why does my app not load the saved user scope my.settings when it starts by way of the registry run key? This key starts programs after the user login, per microsoft. So why does it not load the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.