AppSettings


G

Guest

Hi-I am wondering how the static property AppSettings takes index. I'd like to do the same thing but I can't make the this method static by definition and can't pass a parameter to a static property. Any idea? thx-Moheb
 
Ad

Advertisements

P

Patrick Steele [MVP]

Hi-I am wondering how the static property AppSettings takes
index. I'd like to do the same thing but I can't make the
this method static by definition and can't pass a parameter
to a static property.
It's a static property, but it returns a NameValueCollection instance
(which is not static). That's the object with the "this[]" indexer.
 
Ad

Advertisements

G

Guest

Its a bit strange because the returning type determines the incomming args, but I guess some overloading is happening underneath which makes this possible. Anyway, I tested it and it works. Thanks for your input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

AppSettings 2
AppSettings 1
AppSettings problem 2
StringDictionary and AppSettings 0
appSetting Parameter 2
AppSettings in Whidbey Express 2
appSetting in .Config file 6
appSettings in config file 0

Top