J
jhgonzales
I've created a class where the New constructor opens a database connection. I
can't figure out the necessary code to "automatically" close and dispose of
the database connection when the class I've created goes out of
scope...without needing to call a method to specifically to do that. I would
like to ensure that the database connection is closed when the class is used
and no explicit close is called by the caller.
can't figure out the necessary code to "automatically" close and dispose of
the database connection when the class I've created goes out of
scope...without needing to call a method to specifically to do that. I would
like to ensure that the database connection is closed when the class is used
and no explicit close is called by the caller.