Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global Variables - Visible anywhere
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Global Variables - Visible anywhere
Miscellaneous
Thread ID:
00657993
Message ID:
00657993
Views:
50
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.
Next
Reply
Map
View

Click here to load this message in the networking platform