菜鸟请教类型转换的问题
程序代码:
string a = number1.Text; string b = number2.Text; string c = number3.Text; int.Parse(a); int.Parse(b); int.Parse(c); if (a>b & a>c) {biggest .Text =a;} if (b>a & b>c) {biggest .Text =b;} if (c>a & c>a ) { biggest.Text =c;}这段代码怎么还会说错误 :
运算符“>”无法应用于“string”和“string”类型的操作数
就是这段代码错了:
if (a>b & a>c)
{biggest .Text =a;}
if (b>a & b>c)
{biggest .Text =b;}
if (c>a & c>a )
{ biggest.Text =c;}
------------------------------我------------------割---------------------------
{
int.Parse(a);
int.Parse(b);
int.Parse(c);
}
可这里不是用了类型转换吗?
----------------------------------------------------
请高手回答。Thanks a lot.