store user-settings
-
VB.NET 2.0 has the 'my.settings', is there a way to accomplish the same in C#?
-
VB.NET 2.0 has the 'my.settings', is there a way to accomplish the same in C#?
If you look in the Solution Explorer under you project, you should see Properties and under that, Settings. In there you can customise your user and app settings. Then in the code, just refer to it such as:
Properties.Settings......
If you open up Settings in Solution Explorer,there's a link in there also that gives you more information. Hope this helps Andy -
If you look in the Solution Explorer under you project, you should see Properties and under that, Settings. In there you can customise your user and app settings. Then in the code, just refer to it such as:
Properties.Settings......
If you open up Settings in Solution Explorer,there's a link in there also that gives you more information. Hope this helps AndyAndy, I got some settings defined in the Project-Properties-Setttings page. But the problem is to access them. All samples in the documentation (incluing the link on that page) only refer to VB.NET's My.Settings, not C#. I tried entering Properties.Settings in the code editor, but then Intellisense doesn't pop-up anything... Could you elaborate, assuming I have defined a string-setting named 'username' in the settings-page? Thanks, Paul
-
Andy, I got some settings defined in the Project-Properties-Setttings page. But the problem is to access them. All samples in the documentation (incluing the link on that page) only refer to VB.NET's My.Settings, not C#. I tried entering Properties.Settings in the code editor, but then Intellisense doesn't pop-up anything... Could you elaborate, assuming I have defined a string-setting named 'username' in the settings-page? Thanks, Paul
Okay, okay, so I didn't look good enough :-O I found my setting under Properties.Setting.Default.xxxx Thanks for pointing me in the right direction!!! Paul