You can accomplish the same by create in class with static properties that
will act as global variables. Since the properties are static you don't need
an instance of the class, so you can use it like this:
Globals.MyVariable = "Testing";
Implementation:
public class Globals
{
static string _myVariable;
static public string MyVariable
{
get
{
return _myVariable;
}
set
{
_myVariable = value;
}
}
}
--
Greetz
Jan Tielens
________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Marinos Christoforou" <ma*****@globalit.com.cy> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
Hi,
I am using C# to develop Windows forms applications. I previously worked
with VB 6. My question involves the following scenario.
I want to create a splash screen, which on application start-up will be
displayed and at the same time load some data from a database, and do some
initialization and configuration. In VB I can have a global module where I
would declare system wide global variables which would be set during this
start-up period. How would I do this in C# given that it doesn't have
global variables.