Quote Originally Posted by jmcilhinney
Firstly, not all disposable objects have an IsDisposed property. IsDisposed is not a member of IDisposable. It's a member of the Control class, added so that you can check whether a control is disposed before calling its Show method.
Yes. I just discovered that the DataTable class does not have an IsDisposed property so I amended the procedure to:

Code:
  Public Sub DisposeObject(ByVal myObject As Object)
        Try
            myObject.Dispose()
        Catch ex As Exception
         
        Finally
            myObject = Nothing
        End Try
    End Sub