K
KevinRug
in one page, i am able to declare and initialize a variable like this, in
one line.
cmdPersonalInfo = new SqlCommand("getPersonalInfo", myG.sqlConnection);
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("getPersonalInfo", myG.sqlConnection);
Any ideas on why it behaves differently?
thanks for any help.
one line.
cmdPersonalInfo = new SqlCommand("getPersonalInfo", myG.sqlConnection);
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("getPersonalInfo", myG.sqlConnection);
Any ideas on why it behaves differently?
thanks for any help.