M
MP
I have following
In structure Employee is declared public int EmpId
Employee mp = new Employee();
mp.EmpId = txbName.Text;
Error:
Cannot implicitly convert type string to int
I have try with cast:
mp.EmpId = (int) txbName.Text;
It doesn't work
mp.EmpId.ToString = txbName.Text;
It doesn't work too?
In structure Employee is declared public int EmpId
Employee mp = new Employee();
mp.EmpId = txbName.Text;
Error:
Cannot implicitly convert type string to int
I have try with cast:
mp.EmpId = (int) txbName.Text;
It doesn't work
mp.EmpId.ToString = txbName.Text;
It doesn't work too?