repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* MonthCalendar.cs:
[mono-project.git]
/
mcs
/
btests
/
ForEachA.vb
blob
66d9da099da9d33017c8824453ad3f0b64f41d5e
1
Imports System
2
3
Module
M
4
Sub
Main
5
Dim
a
As
Integer
() = {
1
,
2
,
3
}
6
Dim
b
As
Integer
7
Dim
c
As
Integer
=
0
8
For Each
b
In
a
9
c
=
c
+
b
10
c
=
c
+
1
11
Next
12
If
c
<>
9
Then
13
Throw
New
Exception
(
"#A1: count is wrong"
)
14
End If
15
c
=
0
16
For Each
b
In
a
17
c
=
c
+
b
18
c
=
c
+
1
19
Dim
d
As
Integer
20
For Each
d
In
a
21
c
=
c
+
d
22
Next
23
Next
24
If
c
<>
27
Then
25
Throw
New
Exception
(
"#A2: count is wrong"
)
26
End If
27
End Sub
28
End Module
29