Gustavo

Gustavo

  • NA
  • 1.3k
  • 452.5k

Ho do I: Make an Instance global?

Apr 13 2010 12:16 PM


Hello:
 
I am cleaning my code and trying to make whatever I can global. Global might not be the right terminology.
 
I put most of my global variables in the 'program.cs' and its working fine.
 
Is there a way to put the instances in there or make global some other way?
 
This is the line I would like to make golbal:
FormICEPack FormICEPack = Application.OpenForms["FormICEPack"] as FormICEPack;

 
 
I have this line in many places and in many programs/forms. Would like to just have it once.

 

Answers (2)