-// cs0031.cs : Constant value '256' cannot be converted to a byte
-// Line : 7
+// CS0031: Constant value `1022' cannot be converted to a `byte'
+// Line: 9
-public class Blah {
-
- public enum MyEnum : byte {
- Foo = 256,
- Bar
- }
-
- public static void Main ()
+public class Test
+{
+ public static void Main()
{
+ unchecked {
+ byte b = 1024 - 2;
+ }
}
-}
+}
\ No newline at end of file