简体   繁体   English

我如何在 C# 中执行它有人可以帮助我

[英]how can i execute this in C# can someone help me

how can i execute this in C#我如何在 C# 中执行它

if txtbxquantity.text <=5     
then    
    txtbxhighlowitem.text = low item    
else    
    txtbxhighlowitem.text = high item    
end if    

Probably you want to do next:可能你接下来想做:

int lowitem=0;
int highitem=0;
if(Convert.ToInt32(txtbxquantity.Text)<=5)
    lowitem = Covnert.ToInt32(txtbxhighlowitem.Text);
else 
    highitem = Covnert.ToInt32(txtbxhighlowitem.Text);

or或者

    private void button1_Click(object sender, EventArgs e)
    {
        string lowitem = "low item";
        string highitem = "high item";
        if (Convert.ToInt32(txtbxquantity.Text) <= 5)
            txtbxhighlowitem.Text = lowitem;
        else
            txtbxhighlowitem.Text = highitem;
    }

 if (txtbxquantity.Text <= "5") { txtbxhighlowitem.Text = "low item"; } else { txtbxhighlowitem.Text = "high item"; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM