in one page, i am able to declare and initialize a variable like this, in
one line.
cmdPersonalInfo = new SqlCommand("get PersonalInfo", myG.sqlConnecti on);
In another page it gives me an error when doing as above and I must first
declare then initialize, like so:
SqlCommand cmdPersonalInfo ;
cmdPersonalInfo = new SqlCommand("get PersonalInfo", myG.sqlConnecti on);
Any ideas on why it behaves differently?
thanks for any help.
one line.
cmdPersonalInfo = new SqlCommand("get PersonalInfo", myG.sqlConnecti on);
In another page it gives me an error when doing as above and I must first
declare then initialize, like so:
SqlCommand cmdPersonalInfo ;
cmdPersonalInfo = new SqlCommand("get PersonalInfo", myG.sqlConnecti on);
Any ideas on why it behaves differently?
thanks for any help.
Comment