D
Dan
Here is the code. If I rem out the first line, everything works, but
I can't reference the myVariables object in later methods (form
events). If I leave it in, and remove the declaration line in the
Main method, I get an error (Error 1 An object reference is required
for the nonstatic field, method, or property
'RLPI.Subscriptions.Explorer.myVariables'). How do I refence a
varialbe accross methods, within a class?
Thanks.
public BaseVariables myVariables = new BaseVariables();
public static void Main()
{
BaseVariables myVariables = new BaseVariables();
myVariables.connectionString =
"server=SQLDB.RL.INT;database=Subs_Dev;Integrated Security=SSPI;";
myVariables.LoadSqlConnection();
Application.Run(new Explorer());
}
Dan
I can't reference the myVariables object in later methods (form
events). If I leave it in, and remove the declaration line in the
Main method, I get an error (Error 1 An object reference is required
for the nonstatic field, method, or property
'RLPI.Subscriptions.Explorer.myVariables'). How do I refence a
varialbe accross methods, within a class?
Thanks.
public BaseVariables myVariables = new BaseVariables();
public static void Main()
{
BaseVariables myVariables = new BaseVariables();
myVariables.connectionString =
"server=SQLDB.RL.INT;database=Subs_Dev;Integrated Security=SSPI;";
myVariables.LoadSqlConnection();
Application.Run(new Explorer());
}
Dan