Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global variable
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00877826
Message ID:
00877835
Views:
36
Hi Simplicio,

You can use static class members for global variables. Here is an example:
public class MyStaticTest
{
  static public int i = 100;
}

MessageBox.Show(MyStaticTest.i.ToString());
>im new to c# . how do i delacare a global variables dat can be access by the whole application? because in Foxpro i used to declare global variable for my connection to remote database.tnx
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform