?
Solved

Expose my.settings outside of project / namespace

Posted on 2007-08-08
1
Medium Priority
?
355 Views
Last Modified: 2012-05-05
Does anyone know of an efficient way to expose the my.settings outside of the current project?

I ask because ideally, I would like to create project called Environment, that would hold and manage all my user preferences. Since VB.NET has such a nice method for saving settings (my.settings) I would prefer to save it there. But, my other components in different projects (all under the common solution) would need access to those settings. I know that I can create properties in my projects to explicitly pass the values, but that seems sloppy since my number of settings may grow in the future.

I guess I am asking if there is a way to do something like:

<namespace>.my.settings.zzzzz

Thanks!
0
Comment
Question by:IOFDSYS
1 Comment
 
LVL 6

Accepted Solution

by:
Svetlin_Panayotov earned 1000 total points
ID: 19671787
You can't expose My.Settings directly, but you can create your own settings storage class (by inheriting from ApplicationSettingsBase).
There's a sample on MSDN :
http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.aspx
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question