Is there any way to do "using" with the CodeDom?
using(SqlConnection connnection = new SqlConnection("..."))
{
}
Kevin
No, because using is a language specific facility. You'll have to go
the long way around and do:
SQLConnection connection = new SqlConnection("...");
try
{
}
finally
{
connection.Dispose();
}
which is the equivalent. I'm a VBer, and face similar hurdles with
SyncLock and While (both of which *do* have equivalents in C#, but are
somehow ommitted from the CodeDOM)
Damien