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
tag rc1
[mcs.git]
/
errors
/
cs0075.cs
blob
bd3901b9b6f47a94e911c4581fda40d1cd6abb4e
1
// cs0075.cs: To cast a negative value, you must enclose the value in parentheses
2
// Line: 20
3
class
X
4
{
5
public readonly int
i
;
6
7
public
X
(
int
i
)
8
{
9
this
.
i
=
i
;
10
}
11
12
public static implicit operator
X
(
int value
)
13
{
14
return new
X
(
value
);
15
}
16
17
public static void
Main
()
18
{
19
int
a
=
4
,
b
=
5
;
20
X x
= (
X
) -
a
;
21
System
.
Console
.
WriteLine
(
x
.
i
);
22
}
23
}