vb.net 字符串连接,下面的代码执行后提示: 从字符串“ennum1&”到类型“Double”的转换无效。 请高手指点
DimiAsRandomi=NewRandom()Dimennum1AsIntegerDimennum2AsIntegerennum1=i.Next(1,99).ToSt...
Dim i As Random
i = New Random()
Dim ennum1 As Integer
Dim ennum2 As Integer
ennum1 = i.Next(1, 99).ToString
ennum2 = i.Next(1, 99).ToString
Label3.Text = "ennum1 & " * " & ennum2 & "=" "
该如何修改才能编译? 展开
i = New Random()
Dim ennum1 As Integer
Dim ennum2 As Integer
ennum1 = i.Next(1, 99).ToString
ennum2 = i.Next(1, 99).ToString
Label3.Text = "ennum1 & " * " & ennum2 & "=" "
该如何修改才能编译? 展开
展开全部
Label3.Text = "ennum1 & " * " & ennum2 & "=" "
改成:
Label3.Text =ennum1.tostring() & "*" & ennum2.tostring() & "="
就可以了,你试试!
改成:
Label3.Text =ennum1.tostring() & "*" & ennum2.tostring() & "="
就可以了,你试试!
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim i As Random
i = New Random()
Dim ennum1 As Integer
Dim ennum2 As Integer
ennum1 = i.Next(1, 99).ToString
ennum2 = i.Next(1, 99).ToString
Label3.Text = ennum1 & " * " & ennum2 & " = "
i = New Random()
Dim ennum1 As Integer
Dim ennum2 As Integer
ennum1 = i.Next(1, 99).ToString
ennum2 = i.Next(1, 99).ToString
Label3.Text = ennum1 & " * " & ennum2 & " = "
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Label3.Text = ennum1 & " * " & ennum2 & " = "
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询