The Using statement in C#
Posted on 2016-10-24
To date, I've been creating a public static class for connecting to host databases, and passing back a connection object. That entails closing the connection and disposing of all the associated objects.
I recently saw code that showed a using statement; I've really only used "using" declarations at the beginning of my code.
I see all of the examples online but none show the entire code for the class. Is there someone out there who'd like to share?
If you have any tips on implementing, I'm all ears!