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
Fix LLVM linker flags for 6.0.
[mono-project.git]
/
mcs
/
tests
/
gtest-329.cs
blob
c5f2dd812406aa0c9586a06da61d8c528429b1b5
1
using
System
;
2
3
public class
NullableInt
4
{
5
public static int
Main
()
6
{
7
object
x
=
null
;
8
9
int
?
y
=
x
as int
?;
/* Causes CS0077 */
10
11
Console
.
WriteLine
(
"y: '
{0}
'"
,
y
);
12
Console
.
WriteLine
(
"y.HasValue: '
{0}
'"
,
y
.
HasValue
);
13
14
int
?
b
=
1
as int
?;
15
if
(
b
!=
1
)
16
return
1
;
17
18
return
0
;
19
}
20
}