J
Joe Fallon
I have a Shared class with a New constructor that initializes some Shared
properties.
One of the steps involves a hit to the database.
My tests show that when called by a WinForms app, the constructor only runs
once.
All calls to the class after this do not casues the construtor to run again.
This means it is a one time hit to the database to load these properties.
1. Can someone confirm this?
When I start and stop the WinForms app the Shared class needs to be
initialized on each re-start.
This makes sense.
My question is how would this class behave as a .dll on an application
server?
What would cause it to load and unload?
I guess the load would be caused by the first call from another class.
But if I change the Config file how do I get it to unload and re-load to
re-read the config file?
properties.
One of the steps involves a hit to the database.
My tests show that when called by a WinForms app, the constructor only runs
once.
All calls to the class after this do not casues the construtor to run again.
This means it is a one time hit to the database to load these properties.
1. Can someone confirm this?
When I start and stop the WinForms app the Shared class needs to be
initialized on each re-start.
This makes sense.
My question is how would this class behave as a .dll on an application
server?
What would cause it to load and unload?
I guess the load would be caused by the first call from another class.
But if I change the Config file how do I get it to unload and re-load to
re-read the config file?