int p,q; float a,b,c,d; a=float.parse(textbox1.text); b=float.parse(textbox2.text); if(p<q) { c=a; d=b; } else { c=b; d=a; } textbox3.text=c;//here the error textbox4.text=d;//also here
Convert.ToString()
textbox3.text=Convert.ToString(c); textbox4.text=Convert.ToString(d);
textbox3.text=c.ToString();
string.format
ToString
//N2 format for printing 2 decimal places. //or use other format as required textbox3.text=string.Format("{0:N2}",c); textbox4.text=string.Format("{0:N2}",d); //or textbox3.text=c.ToString("N2"); textbox3.text=d.ToString("N2");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)