projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2003-02-05 Alan Tam <Tam@suiLung.com>
[mono.git]
/
mcs
/
errors
/
cs-12.cs
1
class Y {
2
byte b;
3
4
public static implicit operator int (Y i)
5
{
6
return i.b;
7
}
8
9
// public static implicit operator byte (Y i)
10
// {
11
// return i.b;
12
// }
13
14
public Y (byte b)
15
{
16
this.b = b;
17
}
18
}
19
20
class X {
21
static void Main ()
22
{
23
Y y = new Y (1);
24
25
switch (y){
26
case 0:
27
break;
28
case 1:
29
break;
30
}
31
32
int a = y;
33
}
34
}