您如何更正此代码? Windows Form C#文本框 [英] How do you correct this code? Windows Form C# textboxes

查看:71
本文介绍了您如何更正此代码? Windows Form C#文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

if (txtBalance.Text == 0)
{
txtOrderStatus.Text = "Paid";
}
else
{
txtOrderStatus.Text = "Unpaid Balance";
}

推荐答案

您可以使用此
You can use this
if (Convert.toInteger16(txtBalance.Text) == 0)







or

if (txtBalance.Text == "0")


嗨沃尔夫索尔,

您也可以使用这个:

Hi wolfsor,

You can use this one also :

if (txtBalance.Text.Equals("0"))



希望对您有所帮助,
:)



I hope this help,
:)


这篇关于您如何更正此代码? Windows Form C#文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆