Can you omit the .Close/.Dispose methods in Monad scripts since the application ends when the script finishes executing, and the connection classes automatically close themselves.
I still suggest using Close & Dispose. Its a good habit, especially if the script may be reused in a different context.
I probably should add a Dispose call for the command object too.
If anything it's not necessary to call both Close and Dispose on the reader. They do the same thing.
Still a good habit to call Dispose on all IDisposables, and Close() for everything Close()-able.
Better to take out the trash too often than not often enough.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.