主题:asp.net 用vb时调用出现奇怪问题
如下代码:
Sub chu(ByVal sender As Object, ByVal e As EventArgs)
Dim a1 As Integer
Dim b1 As Integer
Dim c1 As Integer
If TextBox1.Text <> "" And TextBox2.Text <> "" Then
a1 = Int(TextBox1.Text)
b1 = Int(TextBox2.Text)
Call shuh(a1, b1, c1)
label1.Text = c1
Else
MsgBox("请填完整相应的计算值", MsgBoxStyle.OkOnly, "提示")
End If
End Sub
Sub shuh(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer)
c = a / b
End Sub
End Class
执行后结果总为0,为何,我看了N次,好像没有错啊
请帮忙看看怎么回事
Sub chu(ByVal sender As Object, ByVal e As EventArgs)
Dim a1 As Integer
Dim b1 As Integer
Dim c1 As Integer
If TextBox1.Text <> "" And TextBox2.Text <> "" Then
a1 = Int(TextBox1.Text)
b1 = Int(TextBox2.Text)
Call shuh(a1, b1, c1)
label1.Text = c1
Else
MsgBox("请填完整相应的计算值", MsgBoxStyle.OkOnly, "提示")
End If
End Sub
Sub shuh(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer)
c = a / b
End Sub
End Class
执行后结果总为0,为何,我看了N次,好像没有错啊
请帮忙看看怎么回事