'Using' operand of type '<typename>' must implement System.IDisposable

A Using statement specifies a resource of a type that does not implement the IDisposable interface.

The purpose of a Using block is to guarantee the disposal of a system resource when exiting the block. To satisfy this purpose, the resource must expose the Dispose method implemented from IDisposable.

Error ID: BC36010

To correct this error

  • Remove the resource from the resource list of the Using statement, or replace it with a resource that implements IDisposable.

See Also

Tasks

How to: Dispose of a System Resource

Reference

Using Statement (Visual Basic)

IDisposable