Link to home
Create AccountLog in
Avatar of DavidRothan
DavidRothanFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I iterate My.Settings?

I'm developing an app using VB 2008.

I'd like to save each of 'my.settings' to a text file, so that a users 'my.settings' can be exported to another users machine.

I thought it would be easy to iterate each setting, write the current setting name and value to a simple text file and then read 'em back in a similar fashion.

I can't see a way. I don't need to know about the streamwriter / reading / writing text files, just how to iterate my.settings (if that is possible).

Or....is there a better way of doing this?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

I think you could use the app.config file. You can replicate the app.config file and customise it for each user.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of DavidRothan

ASKER

PERFECT!
Thanks very much!