且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在迁移到VB.NET的代码中处理ADODB.Command对象

更新时间:2023-01-18 18:48:01

使用 Marshal.ReleaseComObject 整理COM对象。 ADODDB是通过COM Interop使用的COM库。

Use Marshal.ReleaseComObject to tidy up COM objects. ADODDB is a COM library being used through COM Interop.

通过COM-Interop使用的COM对象将具有 Dispose 方法,但可能仍需要手动整理。与适当的 .Net对象相反,Net对象可能具有 Dispose 方法,或实现 IDisposable

COM objects being used through COM-Interop will not have a Dispose method, but may still need to be tidied up manually. Contrast with "proper" .Net objects will likely have a Dispose method, or implement IDisposable.