Reputation: 90
I'm learning how to save values to application setting on my vb.net wpf app. But is their a easy way to create new settings in code. Not just change old ones, create new ones. I'm making a note taking program for my employer who is an IT guy who take lots of notes every day. I need to save the notes somewhere. Maybe xml file isn't a good idea just let me know.
Thanks
Upvotes: 0
Views: 110
Reputation: 90
I used a string listarray stored in application settings.
In your project document you can create a setting and in the "type" option click browse. Type in System.Collections.ArrayList
in the select type field. Then in the Page.Load event on your main page type the following code
If My.Settings.setting1 Is Nothing Then
My.Settings.setting1 = New ArrayList()
End If
And then you can use the array as normally. But I think it is a string array so only strings will work. (correct me if I'm wrong)
Upvotes: 0
Reputation: 1365
If the requirement is to store notes, it would be much easier to use Microsoft OneNote comes with MS Office. It also has a free version with any Hotmail, live, msn, outlook accounts. If can store 15GB of data. Even you can use it from any device, Windows, iPad, Android etc.
Upvotes: 2