A
A.M
Hi,
Why C# compiler returns "Use of unassigned local variable 'reportParams'"
during compilation of this code?
System.Data.SqlClient.SqlDataReader reportParams;
try
{
reportParams = SqlHelper.ExecuteReader(Global.ConnectionString ,
"up_Report");
}
catch (Exception ex)
{
Log(ex);
Response.Redirect ("ErrorReport.aspx",true);
}
finally
{
reportParams.Close();
}
Thanks,
Ali
Why C# compiler returns "Use of unassigned local variable 'reportParams'"
during compilation of this code?
System.Data.SqlClient.SqlDataReader reportParams;
try
{
reportParams = SqlHelper.ExecuteReader(Global.ConnectionString ,
"up_Report");
}
catch (Exception ex)
{
Log(ex);
Response.Redirect ("ErrorReport.aspx",true);
}
finally
{
reportParams.Close();
}
Thanks,
Ali