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
 
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.
 
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

Top