G
Guest
consider these two using statements:
using (SqlConnection sqlcon1 = new SqlConnection(constr))
{ ...}
and
if (this.rbl_LTorST.SelectedValue == "0")
rdr = rfcs.fn_SpecData();
else
rdr = rfcs.fn_SpecData2();
using (rdr)
{...}
When an excption occurs the error message is still displayed as normal, but
the object is removed as if it were traped in a try catch finally?
just want to be sure.
also: is there a time when in is not advisable to use a uning or a tray
catch finally?
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)
kes
using (SqlConnection sqlcon1 = new SqlConnection(constr))
{ ...}
and
if (this.rbl_LTorST.SelectedValue == "0")
rdr = rfcs.fn_SpecData();
else
rdr = rfcs.fn_SpecData2();
using (rdr)
{...}
When an excption occurs the error message is still displayed as normal, but
the object is removed as if it were traped in a try catch finally?
just want to be sure.
also: is there a time when in is not advisable to use a uning or a tray
catch finally?
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)
kes