2007-09-14, 09:49 PM
Well, you could maybe create a "singleton" class....
Don't know if you did any Java, and never used it in C#, but it should...
Basically what you do is create a static variable of the type of your class...
Then, in your constructor (or initialize code) you check if this variable is initialized and, if not, create a new intance of your class.
You then return a reference to this instance....
Maybe a "google" for "singleton c#" will help...
Don't know if you did any Java, and never used it in C#, but it should...
Basically what you do is create a static variable of the type of your class...
Then, in your constructor (or initialize code) you check if this variable is initialized and, if not, create a new intance of your class.
You then return a reference to this instance....
Maybe a "google" for "singleton c#" will help...
//Ton