Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Instance Scoped Settings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sid Price - 31 Oct 2007 21:34 GMT
I am writing an application that needs to be a multi-instance application.
With VB.NET 2005 this is pretty straight-forward except that I can not find
any information about saving instance specific settings. The idea would be
to have an instance identifier passed into the application from the command
line that would identify the particular instance and then to use that to
recover the settings specific to that instance. I realize this can be done
using an XML or other format file but it seems that it should be possible to
make use of a settings type class. At this time I have not found a way of
doing this and would appreciate any suggestions,
Sid.
Peter Duniho - 31 Oct 2007 23:44 GMT
> [...] The idea would be
> to have an instance identifier passed into the application from the command
[quoted text clipped - 3 lines]
> make use of a settings type class. At this time I have not found a way of
> doing this and would appreciate any suggestions,

Off the top of my head, I can't recall if the basic Settings class used
in VS 2005/.NET 2.0 supports targeting a specific file.  But if not,
I'm almost positive that the ConfigurationManager does.

So, you could save and load settings that way.  That should minimize or
eliminate any need to write custom XML generation/parsing code.

Of course, there's also always just regular serialization.  You could
create a class to save the settings, mark it as [Serializable] and then
save/load an instance of that class to/from a specific FileStream.

Pete

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.