fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public enum ClientColor
  6. {
  7. Green,
  8. Red
  9. }
  10. public enum SharedColor
  11. {
  12. Red,
  13. Green
  14. }
  15. public static void Main()
  16. {
  17. Console.WriteLine("Type casting ClientColor.Red to SharedColor: "+(SharedColor)ClientColor.Red);
  18. }
  19. }
Success #stdin #stdout 0.04s 22316KB
stdin
Standard input is empty
stdout
Type casting ClientColor.Red to SharedColor: Green