E
Ed Hochberg
Hi All,
New to C# and I don't understand why I am getting this error.
I declare Cst as a string at the top of the procedure
String Cst, Prv, Geo, Grp, Itm;
Later on I have this "if" statement (where lvCust is a Listview):
if (lvCust.SelectedItems.Count > 0)
{
Cst = lvCust.SelectedItems[0].SubItems[0].Text;
}
Then I am trying to pass Cst to a Stored Procedure but I have this error
from the compilier?? (The funny thing is that the other varaiable don't have
any error messages)
"Use of unassigned local variable 'Cst'"
Thanks
New to C# and I don't understand why I am getting this error.
I declare Cst as a string at the top of the procedure
String Cst, Prv, Geo, Grp, Itm;
Later on I have this "if" statement (where lvCust is a Listview):
if (lvCust.SelectedItems.Count > 0)
{
Cst = lvCust.SelectedItems[0].SubItems[0].Text;
}
Then I am trying to pass Cst to a Stored Procedure but I have this error
from the compilier?? (The funny thing is that the other varaiable don't have
any error messages)
"Use of unassigned local variable 'Cst'"
Thanks