I'm new to VB .NET.
I have an application that I need to record a log file of things that take place while the application is running. This log file then needs to be viewed / printed by the user when the processing is done (or application is closed). It will only be used by 1 user at a time.
I have a class that takes care of creating the log file and writing entries to it, but he problem I have is how to manage it so different parts of the program can use the class and still write to the same file.
In the past (with VB6), I just put a global log object in the startup class and used that global object in every other part of the program.
In a module, I put something like this:
Public g_objLog as clsAppLog
Then I would just use g_objLog from anywhere in the application I needed to.
What's the best way to accomplish the same thing in VB .NET? Can I have a global object?