fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public enum Foo
  6. {
  7. Bar,
  8. Baz
  9. }
  10.  
  11. public static void Main()
  12. {
  13. Foo value1 = 0.0;
  14. Foo value2 = 1.0; // This line does not compile
  15. Foo value3 = 4.2; // This line does not compile
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(13,21): error CS0266: Cannot implicitly convert type `double' to `Test.Foo'. An explicit conversion exists (are you missing a cast?)
prog.cs(14,13): error CS0266: Cannot implicitly convert type `double' to `Test.Foo'. An explicit conversion exists (are you missing a cast?)
prog.cs(15,13): error CS0266: Cannot implicitly convert type `double' to `Test.Foo'. An explicit conversion exists (are you missing a cast?)
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty