I understand that C-sharp doesn't have global variables, but I'm not quite sure how to do what I need.
I'm building a project in which I want to pass some [optional] command-line parameters to a sub Main, then instance a class I've created (called 'DataFilesHandler') and set properties if parameters were passed.
So far so good - that part has been simple.
Now, however, I want to access that DataFilesHandler class instance in which the properties have been set...but its scope is limited to the Program.cs class in which the sub Main resides; I can't access the object in my form class or any other classes in my project.
What is the correct way to instance this object so I can access methods and properties of my DataFilesHandler instance in the various forms and classes of my project?
Thanks!
I'm building a project in which I want to pass some [optional] command-line parameters to a sub Main, then instance a class I've created (called 'DataFilesHandler') and set properties if parameters were passed.
So far so good - that part has been simple.
Now, however, I want to access that DataFilesHandler class instance in which the properties have been set...but its scope is limited to the Program.cs class in which the sub Main resides; I can't access the object in my form class or any other classes in my project.
What is the correct way to instance this object so I can access methods and properties of my DataFilesHandler instance in the various forms and classes of my project?
Thanks!