Click here to Skip to main content
15,923,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Relatively new to C#, I'm modifying an existing program to control motor functions in C#. I have a button that requests the current motor position from the motor. I'd like to be able to save that value and then call it again as necessary. I've done this in the past using databases/table adapters, however, in those cases I was just accessing the data from the database and not writing back to the database. Since I only need to save two of these values (and have them update using the aforementioned button) it seems like overkill to use a database, and I was wondering if there is a standard method for doing this sort of thing. Thanks.
Posted

1 solution

If you don't need to keep any kind of history, I'd use a Settings object, and just store them on the local machine.
 
Share this answer
 
Comments
Member 8151917 10-Aug-11 19:01pm    
Does creating a user-scope setting with a value that can be updated whenever the user clicks the button which gets the new motor position sound sane? Thanks. (And apologies for the double question, I'm still catching up best practices in C#, so I really just want to confirm the reasonableness of my plan.)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900