Home All Groups Group Topic Archive Search About

Reflection and My.Settings?

Author
12 Sep 2006 9:27 PM
Ben R.
Hi,

Not sure if this is possible, but is it possible to late bind to a setting?
I want to be able to construct a string and then based on the value of that
string, load the setting which goes by that name in my.settings. Anyone know
if this can be done?

Thanks...

-Ben

Author
12 Sep 2006 11:22 PM
Herfried K. Wagner [MVP]
"Ben R." <benr@newsgroup.nospam> schrieb:
> Not sure if this is possible, but is it possible to late bind to a
> setting?
> I want to be able to construct a string and then based on the value of
> that
> string, load the setting which goes by that name in my.settings. Anyone
> know
> if this can be done?

'My.Settings(<property name as string>)'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
13 Sep 2006 12:47 PM
Ben R.
Wow, very straight-forward. Thanks...

-Ben

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "Ben R." <benr@newsgroup.nospam> schrieb:
> > Not sure if this is possible, but is it possible to late bind to a
> > setting?
> > I want to be able to construct a string and then based on the value of
> > that
> > string, load the setting which goes by that name in my.settings. Anyone
> > know
> > if this can be done?
>
> 'My.Settings(<property name as string>)'.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
>