Information générale
Titre:
.Net Equivalent to goApp.oObject
Versions des environnements
Network:
Windows 2003 Server
I am sure this is a dumb question, but I have yet to find an answer. I have been doing a fair amount of R&D in C#, and I cannot solve this problem.
In VFP I can have a public variable to my "main" application goApp for example. I can then add a Property like oSettings, that I can then reference in other parts of the system.
How the heck do I do this in C#?
In my mind ... scary place as it is ...
public static int main()
{
Object oSettings = new SomeClass();
Application.Run(new MainForm());
}
IN my MainForm and any other form or object, I would like to be able to reference oSettings without having to recreate the object each time.
I hope this makes sense ... )-:
TIA,
Mark
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement