repo.or.cz
/
mono.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git]
/
mono
/
tests
/
enumcast.cs
blob
8650ba501db303af3e91ea0f6fb000b06651fdba
1
namespace
Test
{
2
enum
MyEnum
{
3
ZERO
,
4
ONE
5
}
6
public class
Test
{
7
8
static int
unbox_and_return
(
object
obj
) {
9
return
(
int
)(
MyEnum
)
obj
;
10
}
11
public static int
Main
() {
12
if
(
unbox_and_return
(
MyEnum
.
ZERO
) !=
0
)
13
return
1
;
14
if
(
unbox_and_return
(
MyEnum
.
ONE
) !=
1
)
15
return
2
;
16
return
0
;
17
}
18
}
19
}