2009-02-27 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0151-2.cs
blob7b5bb87c6193cb1c1220b719f6d6942f527c99dc
1 // cs0151-2.cs: A value of an integral type or string expected for switch
2 // Line: 12
4 class Y {
5 byte b;
7 public static implicit operator int (Y i)
9 return i.b;
12 public static implicit operator byte (Y i)
14 return i.b;
17 public Y (byte b)
19 this.b = b;
23 class X {
24 static void Main ()
26 Y y = new Y (1);
28 switch (y){
29 case 0:
30 break;
31 case 1:
32 break;
35 int a = y;