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
Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git]
/
mcs
/
tests
/
gtest-initialize-10.cs
blob
e4810d3277637144d0322f1edc841830890ce6a7
1
using
System
;
2
3
class
Foo
4
{
5
public int
P { get; set; }
6
}
7
8
class
Y
9
{
10
public 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
}