which is better from the following options
Is it enough to use one operator?
Option 1:
using(SqlConnection con = new SqlConnection(constring))
{
using(SqlCommand cmd = new SqlCommand())
{
.........................
.........................
.........................
}
}
Option 2:
using(SqlConnection con = new SqlConnection(constring))
{
SqlCommand cmd = new SqlCommand();
.........................
.........................
.........................
}
source
share