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
2009-04-24 Miguel de Icaza <miguel@novell.com>
[mcs.git]
/
tests
/
gtest-329.cs
blob
398ad9133c2ae726184b9bcf722dfb619c424a10
1
using
System
;
2
3
public class
NullableInt
4
{
5
public static void
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
}