repo.or.cz
/
mono.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2007-12-06 Jb Evain <jbevain@novell.com>
[mono.git]
/
mono
/
tests
/
array-init.cs
blob
30059e3203cba89a49fc4bbc363154074040e8cd
1
using
System
;
2
3
namespace
Test
{
4
public class
Test
{
5
private static int
[]
array
=
{0, 1, 2, 3}
;
6
private static int
[,]
bar
=
{ {0,1}
,
{4,5}
,
{10,20}
};
7
8
public static int
Main
() {
9
int
num
=
1
;
10
int
t
=
0
;
11
foreach
(
int
i
in
array
) {
12
if
(
i
!=
t
++)
13
return
num
;
14
}
15
16
num
++;
17
if
(
bar
[
0
,
0
] !=
0
)
18
return
num
;
19
num
++;
20
if
(
bar
[
0
,
1
] !=
1
)
21
return
num
;
22
num
++;
23
if
(
bar
[
1
,
0
] !=
4
)
24
return
num
;
25
num
++;
26
if
(
bar
[
1
,
1
] !=
5
)
27
return
num
;
28
num
++;
29
if
(
bar
[
2
,
0
] !=
10
)
30
return
num
;
31
num
++;
32
if
(
bar
[
2
,
1
] !=
20
)
33
return
num
;
34
35
num
++;
36
37
short
[,]
j
=
new short
[
4
,
2
]
{ {0,1}
,
{2,3}
,
{4,5}
,
{6,7}
};
38
if
(
j
[
1
,
1
] !=
3
)
39
return
num
;
40
41
return
0
;
42
}
43
}
44
}