Imagine you wanted to write a method one time which was used by 100 different websites. In this method, it would dynamically determine which website it was running under and set a global string called "SiteName" accordingly - ex. "http://asp.net" , "http://microsoft.com",
"http://bing.com", etc.
The "const" keyword clearly won't work when defining SiteName because then it can't be set dynamically.
Intuitively I'm thinking there must be some way to be able to set once, and only once, per session the value of SiteName and then it will be read-only for the rest of the session.
Any ideas?
Robert
Go to the complete details ...