2
Answers

Ho do I: Make an Instance global?

Gustavo

Gustavo

14y
2.1k
1


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)