ByVal iTotal As Integer) As Single
8 'Calculation successful".Click
2 Dim sngAvg As Single
3 sngAvg = GetAverage(01 Private Sub FirstTryCatchButton_Click(ByVal sender As System; This only executes if the line above generated no error
17 MessageBox.Object; iItems)
15
16 ' If the calculation failed.EventArgs) Handles FirstTryCatchButton; Code that might throw an exception is wrapped in a Try block
9 Try
10 Dim sngAverage As Single
11
12 ', you get here
22 MessageBox.Show("Calculation unsuccessful - exception caught", 100)
4
5 End Sub
6
7 Private Function GetAverage(ByVal iItems As Integer; This will cause an exception to be thrown if iItems
13 = 0
14 sngAverage = CSng(iTotal \.Show(")
18 Return sngAverage
19
20 Catch excGeneric As Exception
21 ', ByVal e As System
VB.NET,这个程序是啥意思啊?
答案:2 悬赏:0 手机版
解决时间 2021-03-11 07:11
- 提问者网友:活着好累
- 2021-03-10 08:37
最佳答案
- 五星知识达人网友:思契十里
- 2021-03-10 09:21
FirstTryCatchButton
将某个按钮name改成这个。
功能,大概是测试try catch==
将某个按钮name改成这个。
功能,大概是测试try catch==
全部回答
- 1楼网友:你哪知我潦倒为你
- 2021-03-10 09:59
dim n as integer
dim a(19) as string, i%, j%, k$
i = 0
label1.text = ""
randomize()
for i = 0 to 19
k = ""
n = int(rnd() * 9 + 1)
for j = 1 to n
k &= chr(int(rnd() * 26 + 97))
next j
a(i) = k
next i
for i = 0 to 19
label1.text &= a(i) & space(5)
if (i + 1) mod 5 = 0 then
label1.text &= vbcrlf
end if
next i
这是我改了你的代码做成的,看一下是不是符合要求
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯