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
[sdks] Fix README.md
[mono-project.git]
/
mcs
/
tests
/
gtest-136.cs
blob
5e1ed6a32a568ff1d727d7553ce49b455fbc4982
1
using
System
;
2
3
namespace
Martin
{
4
public struct
A
5
{
6
public readonly long
Data
;
7
8
public
A
(
long
data
)
9
{
10
this
.
Data
=
data
;
11
}
12
13
public static explicit operator
B
(
A a
)
14
{
15
return new
B
((
int
)
a
.
Data
);
16
}
17
}
18
19
public struct
B
20
{
21
public readonly int
Data
;
22
23
public
B
(
int
data
)
24
{
25
this
.
Data
=
data
;
26
}
27
28
public static implicit operator
A
(
B b
)
29
{
30
return new
A
(
b
.
Data
);
31
}
32
}
33
34
class
X
35
{
36
public static void
Main
()
37
{
38
B
?
b
=
new
B
(
5
);
39
A
?
a
=
b
;
40
B
?
c
= (
B
?)
a
;
41
B
?
d
= (
Martin
.
B
?)
a
;
42
}
43
}
44
}