hi guys,
Is it possible in C# to define a global variable or property which can be accessed in the application.
eg. 1. Connection string
can I set the connection staring at the start of the application and then use it whenever I make a SQL connection.
Eg. 2. Store a Companys Name which can be used on all reports & Forms
in VFP I would create an Instance of an Enviromnet class and the every where I would reference those Properties
Eg:
oApp = CreateObject("Environment")
form1.companyname.value = oApp.CompanyName
or oApp.CompanyName = "ABC Ltd"
Also
is it possible to have a Global Error Handler as In VFP.
On error do errorproc
TIA
Fred Besterwitch, MCP
The harder you work. The luckier you get.