Creating dynamic properties

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

Hi,

I m doing a windows program using VB.net for my school
assignment.

I would like to ask is there a way for me to set a path
(eg: //SamPC/data) as something dynamic such as dynamic
properties in 'web.config' file or '.ini', which allows me
to change the path mentioned above easily with compiling
the whole program again.

I tried 'app.config' but it is not successful because I
don't know the proper way of doing it.

Thanks in advance,

Justin
 
Hi Justin,
If I understand you correctly, you are trying to find a way
to alter the execution of the program dependent on data held externally such
as the contents of an ini file. This meaning that you could go in lets say
with a text editor and change a program path for example without having to
recompile right ?

If the path is likely to change frequelty, you may want to consider
prompting the user on the start of the program to change settings or
continue. Else if this is infrequent you could use some other storage
method. The options available could be:-

The system's registry
And INI file as you suggest
An XML storeage for these options.

All of these could be changed from within the progam itself lets say an
Edit/Options Menu Item which presents the user with a form of options, which
you can edit and save.

Is this what you are thinking of ?

Regards - OHM
 
* "Justin said:
I m doing a windows program using VB.net for my school
assignment.

I would like to ask is there a way for me to set a path
(eg: //SamPC/data) as something dynamic such as dynamic
properties in 'web.config' file or '.ini', which allows me
to change the path mentioned above easily with compiling
the whole program again.

Typo? "With" or "without" compiling?
I tried 'app.config' but it is not successful because I
don't know the proper way of doing it.

Configuration Management Application Block
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp>

<http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>
 
Back
Top