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
In class/Microsoft.Build.Tasks:
[mcs.git]
/
tests
/
gtest-initialize-10.cs
blob
3cf41c54996bf16e6e4cd48d3f9087b5f5fcca6b
1
using
System
;
2
3
class
Foo
4
{
5
public int
P { get; set; }
6
}
7
8
class
Y
9
{
10
static int
Main
()
11
{
12
Foo foo
=
new
Foo
();
13
foo
.
P
=
1
;
14
15
if
(!
Do
(
foo
))
16
return
1
;
17
18
Console
.
WriteLine
(
"OK"
);
19
return
0
;
20
}
21
22
static bool
Do
(
Foo f
)
23
{
24
f
=
new
Foo
() {
25
P
=
f
.
P
26
};
27
28
if
(
f
.
P
!=
1
)
29
return false
;
30
31
Foo f2
=
new
Foo
();
32
f2
.
P
=
9
;
33
f2
=
new
Foo
() {
34
P
=
f2
.
P
35
};
36
37
if
(
f2
.
P
!=
9
)
38
return false
;
39
40
return true
;
41
}
42
}