J
Jeremy
I was looking through some sample code that Microsoft provided for data access
and I noticed that when they call the Dispose() method on the Connection
object they cast it to IDisposable first.
CType(connection, IDisposable).Dispose()
Is there any reason that you couldn't just do:
connection.Dispose() ?
What is the difference?
TIA
and I noticed that when they call the Dispose() method on the Connection
object they cast it to IDisposable first.
CType(connection, IDisposable).Dispose()
Is there any reason that you couldn't just do:
connection.Dispose() ?
What is the difference?
TIA