c# – 检查NumericUpDown是否为空
发布时间:2020-12-15 17:44:01 所属栏目:百科 来源:网络整理
导读:如何检查用户是否将NumericUpDown控件留空,删除其上的值? 所以我可以将它重新赋值为0. 解决方法 if(NumericUpDown1.Text == ""){ // If the value in the numeric updown is an empty string,replace with 0. NumericUpDown1.Text = "0";}
如何检查用户是否将NumericUpDown控件留空,删除其上的值?
所以我可以将它重新赋值为0. 解决方法if(NumericUpDown1.Text == "") { // If the value in the numeric updown is an empty string,replace with 0. NumericUpDown1.Text = "0"; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |