如何在比较值后显示值 [英] how to display values after compare values

查看:85
本文介绍了如何在比较值后显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想比较两个值

比较值正确然后我想在txtCorrect.Text中显示该结果的计数

如果不正确那么我想显示计数导致txtInCorrect.Text这两个值我想在两个文本框中显示相同的时间





i已经编写了这样的代码

如果rdbAdd.Checked那么

input3 = Integer.Parse(txtResult.Text)'假设输入值Manullay

txtResult.Text = Val(txtInput1。文字)+ Val(txtInput2.Text)

比较= txtResult.Text'实际结果值

结束如果



如果input3 =比较然后

'如何写更正和未修正的结果

否则

如果输入3<>比较然后

'如何写更正和未修正的灵魂

结束如果

i want to compare two values
compared values correct then i want to display count of that result in txtCorrect.Text
if Incorrect then i want to display count of that result in txtInCorrect.Text both the values i want to display same time in both the textboxes


i have written code like this
If rdbAdd.Checked Then
input3 = Integer.Parse(txtResult.Text) 'Assumed value Manullay entered
txtResult.Text = Val(txtInput1.Text) + Val(txtInput2.Text)
compare = txtResult.Text 'Actual result value
End If

If input3 = compare Then
' how to written corrected and incorrected resulets
Else
If input3 <> compare Then
' how to written corrected and incorrected resulets
End If

推荐答案

If input3 = compare Then
' how to written corrected and incorrected resulets
txtCorrect.Text = "1"
Else
If input3 <> compare Then
' how to written corrected and incorrected resulets
txtInCorrect.Text = "0"
End If


这篇关于如何在比较值后显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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