I’m trying to use my ‘context’ object in a using statement. It works on one project, but on another, I’m getting the following error.
‘…’: type used in a using statement must be implicitly convertible
to ‘System.IDisposable’
When I’m referring to the ‘context’ object, I’m referring to the object automatically created when you’re working with LINQ to SQL.
The class I’m working within, implements another interface, could that be screwing up this context object?
using (TGDC context = new TGDC())
{
}
the word
using
has the red squigly line under it (error).
You should add a reference to
System.Data.Linq. I suspect that’s the issue.