我是新手,所以请耐心等待,我对if声明有点麻烦.
如果textbox 2超过0.5,我想在文本框1中打印一条消息.任何人都可以帮忙.
class Product
{
public string collectmessage1()
{
return "Collect your product";
}
if (txtMoney.Text > 0.5)
{
Product cokecollect;
cokecollect = new Product();
txtProducts.Text = cokecollect.collectmessage1();
}
Run Code Online (Sandbox Code Playgroud)