I'm not particularly familiar with CodeDom, but a
using
statement can be rewritten using
try-finally
, for example:
(SqlConnection con1 = new SqlConnection(Core.ConnectionStringSample))
{
}
can be written as:
SqlConnection con1 = new SqlConnection(Core.ConnectionStringSample);
try
{
}
finally
{
if (con1 != null)
{
con1.Dispose();
}
}