repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2009-07-16 Jb Evain <jbevain@novell.com>
[mcs.git]
/
tests
/
gtest-initialize-05.cs
blob
e2d86af3003fea41c3f0c3f681294278c7f7914c
1
2
3
struct
Point
4
{
5
public int
X
,
Y
;
6
}
7
8
class
C
9
{
10
static
Point p
;
11
12
public static int
Main
()
13
{
14
new
Point
{
15
X
=
0
,
16
Y
=
0
17
};
18
19
var
markerPosition
=
new
Point
{
20
X
=
2
*
3
,
21
Y
=
9
22
};
23
24
if
(
markerPosition
.
X
!=
6
)
25
return
1
;
26
27
if
(
markerPosition
.
Y
!=
9
)
28
return
2
;
29
30
Point
[]
pa
=
new
Point
[]
{ new Point { X = 9 }
,
new
Point { X = 8 }
};
31
32
if
(
pa
[
0
].
X
!=
9
)
33
return
3
;
34
35
if
(
pa
[
1
].
X
!=
8
)
36
return
3
;
37
38
p
=
new
Point { Y = -1 }
;
39
if
(
p
.
Y
!= -
1
)
40
return
4
;
41
42
return
0
;
43
}
44
}