fork download
  1. using System;
  2.  
  3. enum Smth : long
  4. {
  5. Yes = 0x4014000000000000,
  6. No = 0x0,
  7. }
  8.  
  9. static class SmthExts
  10. {
  11. public static double Value(this Smth x)
  12. {
  13. return BitConverter.Int64BitsToDouble((long)x);
  14. }
  15. }
  16.  
  17. public class Test
  18. {
  19. public static void Main()
  20. {
  21. Console.WriteLine("0x{0:X}", BitConverter.DoubleToInt64Bits(5));
  22. Console.WriteLine();
  23. Console.WriteLine(Smth.Yes.Value());
  24. Console.WriteLine(Smth.No.Value());
  25. }
  26. }
Success #stdin #stdout 0.03s 16236KB
stdin
Standard input is empty
stdout
0x4014000000000000

5
0